Q. You can't. But you don't need to - it's an entirely hypothetical problem that you have constructed in your mind. Men and women's changers have existed since public changers became a thing. People respect these conventions, with trans people always using those according to whether they have socially/ medically transitioned or not.
Cases of assault in these areas are rare (most violence against women/girls happens in other types of settings) - but they do happen sometimes, of course, and they are terrible, and inexcusable, and every single case is one case too many. But there is no logical reason or evidence base for thinking this will happen less if we bar trans people from using toilets according to their gender.
Q. I don't think the differences between men and women are about feelings. The vast majority of people are not trans. Most people are (cisgender) men and women which are categories that map onto important, social and biological differences (although these aren't as mutually exclusive and binary as people like to pretend they are - and overstating difference is also a means of maintaining patriarchy).
There are also a small minority of people who are transgender who have a naturally occurring type of neurodevelopmental, cognitive difference which means that they recognise/ understand themselves to be a different sex from the sex that corresponds to their physical attributes as observed at birth. We don't know exactly what causes this neurodevelopmental difference, like other types of difference, it's likely to have complex biological/ environmental/developmental underpinnings. Like autism there is evidence that suggests a genetic component tied to sex hormone signalling genes that operate systemically across the body and also within the structures of the brain. Supressing or denying this cognitive experience can be psychologically torturous for the individual, resulting in extreme distress and mental illness, and psychological therapies aimed at forcing the individual to accept their 'birth sex', can be deeply harmful rather than helpful. These people need to be accommodated in society.
I know there is a very popular narrative afloat these days that separate facilities for men and women are about safeguarding so that men can be separated from women. But the truth is that these spaces are not locked or policed - they work according to social convention - anyone who has predatory intentions can enter at ease.
They aren't really about 'preventing violence and pregnancy (I lol when that one gets brought up) at all , but rather (heteronormative) social norms and conventions around privacy and dignity.
Violence/ harassment does increase in shared spaces (by which I mean shared between all men and women, not trans-inclusive separate facilities) because of the novelty/ transgression of being in a space that runs counter to the usual social norms/ ideas about privacy / dignity.
The best policy, therefore, proportionate to everyone's needs is to maintain these spaces but to accommodate the small numbers of transitioned trans people who also need a dignified, private and safe place to use facilities. Their also may be some specialist services that should be reserved for female people, with shared physical characteristics - such as specialist rape support or medical services, just as there are sometimes services just for disabled women, or black women etc, to meet their needs.