I didn't see that at all.Except - using your comparison to being gay or transgender - the message at the end of the episode that came over to me is actually that society will only accept the individual if they live a heteronormative cis life and that conforming to those expectations are in the childs best interest.
For one thing, the decision of the Moclan tribunal was not portrayed as something that the lead humans agreed with. They were instead fighting against the decision of the child's parents at every stage throughout the episode. Any message has to be filtered through the moral perspective of the show, which in this case was defined mainly by Mercer, Grayson, and Finn.
If anything, the episode was pointing out that people who pressure or force others to conform often believe that they are acting in the best interests of those they are pressuring or forcing, but that's not the same thing as siding with their position. As @Serveaux said, it was also making the point that people tend to stick to their beliefs and ignore evidence.
Therefore, IMO, the episode was an allegory for the obstacles that transgender people face. But it also presented itself as an allegory for the obstacles that women face, and therefore also any class of people who are discriminated against and pressured to conform in some way.
By quite clearly saying "This is the wrong way to treat people," the episode in no way endorsed the position of the Moclans or anything in correspondence with it in allegory.
With others, I suspect that this particular story may not be over.