If you have toilets packed in at the highest possible density then you can have many stalls and far fewer basins for washing hands, with a single door for the room and then "doors" for the cubicals, along with urinals for the men's toilets. This is good from a capitalist perspective because it is more cost efficient even though the overall experience is not very good. This type of room does not make me feel safe and in fact feels quite distinctly unsafe, with other people able to intrude on my private time.
The best alternative is not to have that but without gender segregation. It is to have fully enclosed rooms with a door and a toilet and hand basin. If someone goes in the door is closed and locked. They use the facilities however they need to and then waash their hands and leave. Whether they were one gender or not doesn't matter, they are just a person using a bathroom.
The less awesome alternative is like my experience of European toilets. The stalls are floor to ceiling and have individual locks on them, the hand basins are in the middle, and if there are urinals they are individual rather than a wall and have dividers.
I think businesses should be required by law to have bathrooms as part of the facility they occupy. For example, and independent building away from any others would need internal bathrooms, whereas a shop in a shopping centre would have the centre toilets. The number should be proportionate to the maximum number of people there at any time and should have a meaningful number be more accessible than the others for people with mobility support needs.
But yes, culturally, if you got rid of big rooms with lots of shared toilets and instead had individual doors for each toilet I think you could get rid of the gender entirely overnight. If you wanted to have genderless toilets with shared spaces it would have a lot of difficulties and I don't think it would be worth pushing for. Pushing for the individual toilet rooms solves most of the problems together without introducing more problems and is something that feels more like the toilet at home, just a room you use that could have people of any gender and proper privacy.