The view of the analogy that you seem to not be able to see is that you told us
"I don’t believe that keeping trans women out of women’s toilets significantly reduces the risk of crime"
Meaning, that you don't see excluding male people who all have the same risk of committing sex crime from female toilets reduces crimes being done to female people in those toilets.
Sure, it doesn't entirely prevent it, just like locking your door won't stop someone who really wanted to enter your property. They will do it anyway. But it is a deterrent that is accepted by society. It also has some legal ramifications for insurance etc.
The analogy is, why do we bother locking the door if it doesn't completely stop crime? We do it because it prevents a certain number of crimes by simply locking the door. It also allows us to know that if someone is in your house when you haven't invited them in, they are there when they are not supposed to be there. Meaning we exclude all male people, regardless of their philosophical belief about themselves.
Because in doing that, we will be better able to prevent some crimes from happening.
You also seem to be ignoring the known facts, and statistically supported facts, that a male with a transgender identity has at least the same risk profile of committing a sex crime as all other male people in the UK. Therefore that group of male people should always have been and should be now treated as all other male people in the UK are treated.
ie. all male people excluded, no special groups created that are treated as exempt from those safeguarding actions.
There is no logic that supports creating a special group of male people to be allowed in, particularly when that group has AT LEAST the SAME risk profile as all the other male people.
It is an argument purely based on emotionally manipulative premises.