I have long been of the opinion that male guards have no place in women's prisons.
Perhaps they can work there if chaperoned by a female guard. But they should never be alone with prisoners. The risk of them abusing their authority is just too high.
Same with policemen. They can interact with women in public, but as soon as there's any risk of power abuse, there needs to be a policewoman present.
Policemen should also screened for such tendencies, as them being alone with a woman could always still happen accidentally even with safety precautions, but I am not sure how one could do that, the rapist policemen seem to fly under the radar just fine, you aren't going to catch them with a multiple choice test.
I suspect a zero tolerance policy with regard to sexual harrassment in the workplace would already weed out the worst ones ... it shows just how much man dominate society that such behaviours are tolerated in policemen, people the general public is supposed to trust.