A lot of what’s in the X-Men stories are an allegory for society’s unwillingness to accept homosexuality, of individual struggles to hide their secret and learn to live it, etc. The not-terribly-subtle allegory tries to get us to empathize with those who are different and are rejected by society and need to hide their true selves, to be ashamed of who they are. District 9 is a rather heavy handed obvious allegory about why segregation is bad. There are plenty of stories like these, but I decided to use those as two obvious examples.
Here’s the thing: homosexuals aren’t destroying society. They aren’t plotting against heterosexuals. They aren’t some unknown threat of potentially great power with unknown limitations and unknown intentions. They’re just people who like to suck on genitals that match their own. Big deal. It’s not the sort of difference that justifies hatred, shame, oppression, etc. That’s all there is to it. Homosexuals are just other people who are trying to get by in life, same as us. They have the same range of personalities and qualities as any other person. That’s why hatred towards them is unjustifiable and only causes harm.
X-Men Mutants, however, are fucking incredibly dangerous, hard to control, and could very well destroy society. If I lived in the X-Men world, and every other week some mutant or another is assassinating people, destroying a city, causing some sort of terrorist act, fighting amongst each other with tons of collateral damage, I damn well would want them to be controlled.
We’re supposed to believe the guys who want to identify, track, and control mutants are evil hateful bigots. The villains of the stories. But those stories are all about mutant factions that see non-mutants as inferior beings who should be destroyed, or at least ruled over. Often more well-meaning mutants are still losing control of their power and causing untold harm. New powers manifest regularly that completely render our traditional methods of law enforcement and security ineffective. Yes, the protagonists in the story are the “good” mutants, but they don’t represent or control the entirety of the mutant population. The existence of mutants is extremely damaging and de-stabilizing to society. Wanting to be able to keep that shit under control so your civilization doesn’t collapse isn’t bigoted, it’s the only sane option.
So trying to make an analogy that fear/desire to control mutants is equivalent to hating gay people just doesn’t make any sense. The allegorical elements are juvenile and don’t apply on anything but the most superficial “see, he has to hide and be ashamed of his true identity, like a gay person!” level.
If gay people could destroy cities at will, assassinate and terrorize whoever they wanted, felt like heterosexuals are an outdated species that should be slaughtered so the new master race can arise unhindered, I’d be pretty fucking afraid of gay people too.
Basically, you can’t make a story where the real world lesson is “don’t be afraid or hate people, they’re just like you” with the lesson of “don’t be afraid or hate people even though they’re not like you at all and they cause untold damage and completely destabilize our society and they can blend in among us and have unknown abilities and some of them want to commit genocide against you” - it’s absurd.
Same deal with District 9 in place of racism/segregation. It’s been a while so I’m forgetting details, but those aliens couldn’t communicate with people, they were at times hostile to people, they’d eat people’s pets, they couldn’t really live in the same areas as people, they were utterly foreign and alien. They should be segregated off somewhere. They shouldn’t be scattered randomly among people’s neighborhoods. They’re not cute and cuddly like Alf, they’re fucking aliens. “Oh see how we’re segregating these creatures that can’t communicate with you and just ate your cat? That’s the same way you feel about black people! See, black people are just normal people, we shouldn’t segregate them from us. And … walking alien prawn creatures are just like normal people too! See the error in your racist ways!?”
So yeah, if I were to ever take a lesson from these stories, it would have to be the opposite of what’s intended. “Oh, shit, this story makes me worry that gays might have some sort of secret powers that they will use to terrorize and genocide heterosexuals one day!” or “This segregation thing sounds pretty good if the alternative is to have a walking prawn gesticulate at me and eat my cat!”