To completely sidestep gender identity laws, why not have bathroom facilities based upon dick or no dick?
Have a dick? You must use this room to piss or change.
Do not have a dick? You must use this room to piss or change.
100% just boil it down to cock or no cock. I expect having it based upon anatomical reality of one specific organ can't be construed as denying gender identity. It's just cut and dry anatomy standards.
I wouldn't say it's 99% safe.
Sure, no penetrative rape. But ones willing to go that far are still unstable, violent, fetishist weirdos with stronger bone structure, longer reach and more muscle power.
Without testicles, the muscle power is going to decline. They'll have mechanical advantages, sure, but people like Jessica Yaniv would never give up the tiny little dick to jerk off with after asking a beautician to wax the balls.