As an experimental psychologist I really like the OPs way of breaking this down, they did a good job.
I don't think the problem is with stereotypes, though the OP is correct that modern global society is more conscious of different perspectives on how specific stereotypes impact others.
I also don't think the core problem/solution is a threat to escapism. If anything it should make games easier to escape into.
The core problem/solution as I see it is mindless evil. It is one thing to say that some groups participate in cultural practices that others see as a threat to their way of life, but quite another to say that all X are murderous monsters that can be killed with no moral ambiguity. The lack of moral ambiguity in an RPG session is not escapism, it is a specific type of escapism. It is a power fantasy revolving around a simple violent response to the "Other". Nothing takes me out of escapism faster than the paradox of telling me that I am facing an intelligent creature with its own culture and beliefs, but that it cannot and should not be reasoned with in any way.
For some things this "Put the boot to it" mentality makes perfect sense. Demons are by definition the embodiment of horribleness without reason as most see it. Illithids are complicated because they see humans as food and incubators. This is a predator prey relationship and very alien mentality. Drow and Orcs are being handled much better now than they were in past editions, and that is good for a number of reasons.
Just my 2 cents.
Thank you! Nobody has all the answers in one shot, and it's definitely my goal to integrate with other perspectives and come up with a better answer.
I agree that X are murderous monsters that can be killed with no moral ambiguity is a kind of escapism. That make sense!
I think D&D can make moral choices far more painful than they have to be, because proper law enforcement, justice systems and jails/correctional institutions are insufficient or non-existent (especially outside big cities). Capture some mass murderers in the wilderness, for example, and there's often nowhere to turn them in and no way to stop them from murdering innocent people again.
Plus there's often the conceit in D&D that the PCs happen to be the only ones in the area capable of handling that threat level. If I think about it, that's a lot of moral responsibility on a handful of folks who didn't particularly set out to be vigilantes and have no defined rule of law and no professional support network.
They make a wrong choice, and the souls of helpless innocents is fully on their conscience. And in D&D, the stakes can be really high. Sometimes of the torturing or soul-sucking variety.
In real life, if someone is imprisoned for attempted murder, gets early parole, gets out, and then murders their girlfriend... That leaves psychic scars. In Batman, the Joker is imprisoned for mass atrocities, escapes Arkham Asylum, and goes on to torture/murder even more -- I imagine at least 80% of Gotham City is on therapy and really strong anti-anxiety drugs.
So there are tons of opportunities for moral quandaries in fiction. To me, these things will have some impact on my conscience, fantasy or not. Because if I start thinking through the repercussions, I go down that rabbit hole. Before you know it, I'm thinking about how much PTSD the folks of Neverwinter are suffering from after the invasion, and does Cure Wounds heal PTSD or just physical wounds?
So I can see how people could want a fantasy setting that conveniently circumvents that. Maybe they don't want the real stress of moral quandaries. I can't begrudge someone's right to escape into fighting mindless evil, any more than someone who shoots to kill in the hundreds in violent video games.
At the same time, I 100% support someone's need to see a fantasy world where their needs are properly represented in the fiction. This is very important.
For what it's worth, I personally found the always-evil goblins and orcs to be boring in D&D. (I really like the recent multiverse take on goblins coming from the Feywild and only some goblins were corrupted under evil gods -- it seems like a compromise that might not be perfect for everyone, but I like it.)