I'll point out that a pervert that wanted to expose himself to other men or *little boys* could already do this in the exact same circumstances, and nobody seems to be terribly in panic about it as society have already found the ways to deal with that, with the usual limits that nothing in life is ever perfect.
The problem here is divided in many parts:
1. the nudity problem. One thing is a lewd act, like masturbating or touching in public, or other sexually suggestive behaviors. This is already well regulated by plenty of actual laws everywhere.
More or less innocent/temporary nudity is a bit more culturally sensitive... for example, here in Italy, it's quite rare to ever see genitals even in locker rooms: showers are individual stalls with tents, and if somebody have to change underwear first they wrap a towel around their pants.
Apart for the usual intolerant people, here it would not be a problem what happened in that post because exposing genitals would cause troubles whatever the gender of the offender and the space where they would do it.
On the other hand, if you go to northern/eastern countries, it's quite easy to see men and women changing without any special protective care even in the open, on beaches or in parks or whatever (and I'm not talking of specific nudist beaches or things like that... those are for going around regularly naked, not only some brief moments while changing or stuff like that).
I remember at university one year I went to an international camp in Germany: we lived in a big communal area, and me as the only Italian and a bunch of Spanish boys and girls were a bit shocked the first days by the carefree attitude of the others, seeing a lot of male and female genitals (and breasts) being bared without anybody especially caring. After a bit, we got used to it. The rules are simple: you don't stare to people that get naked, you keep it discreet when you have to get naked.
There too it would be only a problem for people having specific issues against trans people, because on any beach kids can already see genitals as a matter of course (and it does not seem to be especially traumatizing).
2. what happened. Now, I don't know exactly what happened in that spa locker room, but that woman was especially vehement in attacking the trans person by strictly categorizing them as a man.
It's possible that the trans behaved badly in there (even if they were not a "fake trans using it as a trick to expose to women", category that seems to be more theoretical at this point than real, they may have been an a-hole... only because somebody belong to a discriminated category, does not mean that they can't be a-holes).
It's also possible though that she was a woman that had an axe to grind (there is the whole category of TERFs... see the previous note about belonging to discriminated category not excluding being a-holes). After all, we don't know much about the true reaction of all the other people present there... most of the articles i checked talk about the online reaction (that of course draw attention of the kind of people that
already agree with those ideas) or go directly to rants about "affront to god and nature" and such things...
3. what happens to trans people now. Trans people right now are heavily, heavily despised by a large share of the population. They are seen by those as, as an article I found online wrote, affronts to god and nature, intrinsically perverts, disgusting and a lot of other things. When they have to deal with other men, this often results in violence toward them at staggering rates.
Having to go in a man's locker room or bathroom "dressed as a woman" would then expose these people to real concrete danger.
I'm sure a lot of people that deny the existence of the "trans" category see this problem having a simple solution: don't go around as recognizably trans.
Well, sorry, but for those of us that are starting (the road is still long) to recognize the right of everybody to express their inner self that's not a solution.
Everybody freedom is a bit like a bubble: it expand till it does impact the freedom bubble of another person. Some may say, I don't want to have trans people around, have to see them doing things I consider immoral, seeing their genitals and so on. But other people say I want to be able to be myself, express myself as the gender I feel to be, for whatever reason, and don't be in danger because of it.
Finding the right balance between these things is a matter on one side for the social community, and on the other side for the state to write down as laws and rules, and this should be done based on priority of dangers, level of damage to the one whose freedoms are denied, and ideally even if unavoidably only very little on number of discomforted people (plus, of course, practicality of the solution).
When the public attitude is changing, unavoidably this process is going to be fraught with false starts, errors, trials and so on, till we reach a new equilibrium. During this process there may be debate and trials and errors, as as humans are humans, there will always be some a-hole trying to use a new rule to their advantage (like they always used any rule to their advantage).
Still, we should not allow people whose real point is "I want my personal freedom of wanting everybody to conform to my personal set of rules and morals or at the very least not offend my eye by behaving differently anywhere I may see or be aware of them even when nobody is really harmed by it" to change the discourse by exaggerating small dangers or inflate little practical difficulties.
My solutions to these problems? Oh, I don't know... talking ooma (out of my ...), without any access to reports, already existing law codes, psychologists consultations and so on, I would likely mandate the realization of a special dedicated space for trans people (or I guess any people uncomfortable with public nudity) people in any place where you *have* to expose yourself, like open-space showers and so on.
You could make it mandatory for new buildings, with a grace period for updating existing ones, and requiring a "trans may use the space they prefer but must not expose their genitals when doing it".
We had here something similar with accessibility rules here: all public places have to have a closed, single person, dedicated accessible (usually mixed) bathroom. Any other bathroom you may have, must be in addition to at least this single one (of course, if there aren't others, anybody may use it, not only disabled people). It took some years to get most buildings up to code, but now it's available everywhere.
Where the problem is simply a restroom with closed stalls, I don't see any problem in letting trans people go wherever they feel more comfortable. If they harass somebody, it's already illegal and they could do it even with the restroom limited to binary sexuality if they wanted to, if they don't and somebody still feel offended, though.
About the sport thing instead, oh, i don't know enough about sports... personally I would allow anybody do whatever they want, maybe introducing some "weight category" like they have in boxing where it could lead to serious problems, like with contact sports (I would note that in those categories this would also help cis-but-small boys compete in such activities).
But I don't really know about what's involved, I would say this would be a matter of discussion for a serious non-political panel of medics and biologists... maybe setting some basic biological parameters to determine which category you may compete in?
I repeat, i don't know, but if the objective is finding a way that allow everybody to self express freely and still compete fairly, instead of simply "either male, female or get out of here", something can be worked out.