Forgive me trying to read your mind, but you sound like you are repeating one of the the gender critical memes about Trans women
The tails (true enough, but rare) of Trans women rapists in prisons demonstrate that prison guards are sadists, not any thing about Trans women
Trans women are on much more danger in men's prisons than natal women are in danger from trans women
Vulnerable men are placed with predatory rapists in prison routinely
Prisons are places of institutional abuse, and torture. Guards (screws) are renound for vicous sadism
Women's prisons absolutely need to be female-only, for the safety and dignity of women. If male prisoners are in danger from other men, for whatever reason (ex-police, pedophile, trans-identifying, etc.), then that is solely an issue to be dealt with within the male prison estate. Not for vulnerable women to be punished with.
This is the problem with the so-called "trans rights" movement more broadly. Their activists will bend over backwards to cater to whatever demands these trans-identifying males have, while completely disregarding all the harmful negative impacts upon women. It's a deeply misogynistic type of activism that is centered almost entirely around male desires.