With grounded desktops this wasn't a problem but with a couple of hundred laptops (each with capacitors connected between device ground and half of mains), the rack with the ethernet switches became dangerous (lethal) to touch due to the voltage present on it.
Well, then the rack metal parts weren't properly earthed according to relevant standards, right?
You are turning the problem around; without shielded ethernet cables a potentially dangerous situation can not occur. It just goes to show that using shielded cables is not a magic solution; quite the opposite, use of shielded cables requires planning the grounding carefully.
Well the 'problem' was indeed that the installation of the network equipment was incorrect, not the laptops. Of course, I agree, just don't use shielded twisted pair. People think it's better, but it's not better. It just costs more and adds complications (if you do it right) or hazards (if you don't).
In the industry this is referred to as 'bonding', as in permanent bonding to earth. In a typical installation, all the structured (permanent) cable must be bonded. There's no need to ground (temporary) the attached equipment, though it commonly will be.
As far as PCB design, it mostly comes down to EMC concerns. If you don't have a chassis ground, the ground plane is likely the best thing to connect it to, probably through a 1nF-ish capacitor.