Thanos: Titan was like most planets. Too many mouths, not enough to go around. And when we faced extinction, I offered a solution.
Dr. Strange: Genocide.
Thanos: At random. Dispassionate, fair to rich and poor alike.
In Avengers: Infinity War, Thanos plans to commit a genocide which is "dispassionate" and "fair." The giant purple alien monster (Josh Brolin) is a kind of intergalactic Malthusian, who believes that starvation and poverty are the result of overpopulation. Rather than using his infinite power to create more planets, or transport people to different star systems, he decides to snap his fingers and erase half the people in the universe, without prejudice. Thanos murders, but he murders indiscriminately, like plague. Except that of course rich people have better diets and access to medicine, and are therefore less likely to die of plague.
The truth is that it's hard to think of an analogy for Thanos' balanced mass murder, because mass murders just aren't balanced. Violence is always inequitable; people singled out for death are singled out for some reason. Like any dream of equality, the dream of equal genocide is a dream—but one which Hollywood, and the MCU in particular, finds oddly compelling. Marvel wants the stakes and the narrative weight of genocide, without the uncomfortable political ramifications. It puts us all under the same cosmic threat, so that everyone can identify equally with those standing against evil.
Typically the world destroying threats in the MCU are world destroying, which means that everyone is equally threatened. Loki in Avengers, Ultron in Avengers II, Dormammu in Dr. Strange, and Ego in Guardians of the Galaxy 2are all god-like beings who plan to conquer earth in its entirety. The plots of these films are all to one extent or another variations on H.G. Wells' War of the Worldsin which they invade us, just as we have in the past invaded them. The "us" here, though, is the entire world—so that Western countries and non-Western countries alike are put in the position of colonized peoples. When earth is invaded, we all become a marginalized, indigenous population.
Or, sometimes, we all become Jews. The Holocaust in Hollywood is often even more of a touchstone for evil than colonial invasion. The MCU references Hitler with some frequency; the corrupt super-secret spy organization Hydra is a kind of Nazi conspiracy without anti-Semitism, dedicated to even-handed and unprejudiced world conquest. Similarly, Loki in The Avengersin one scene demands that a bunch of gathered German kneel before him. One elderly mann, who may or may not be Jewish, refuses. Then the recently resurrected Captain America shows up and declares, "You know, the last time I was in Germany and saw a man standing above everybody else, we ended up disagreeing." Loki is Hitler, but he's a Hitler who doesn't discriminate; the people he's forced to kneel aren't of any one creed or race or demographic. They're just the people who happened to be there when he showed up. The famous Martin Niemöller poem is irrelevant, because Loki didn't come for the trade unionists or the Jews first. He comes for everyone at once.
Thanos' dispassionate and fair genocide, then, isn't as much of an innovation as it looks like. On the contrary, dispassionate, fair genocide is the preferred approach of MCU supervillains. Thanos just explains the rationale more clearly—specifically in a flashback scene with his adopted daughter, Gamora.
Thanos found Gamora on a planet he had invaded. The planet, Thanos claims was mired in misery because of overpopulation and consequent resource failure; to save the world, Thanos murders half the population. While his thugs are rounding up an arbitrarily selected group, Thanos distract Gamora with a double-edged switchblade, which he balances on his finger. "Perfectly balanced, as all things should be. Too much to one side and the other... " As he talks, his troops open fire, probably killing Gamora's mother, among others.
The scene is chilling in its juxtaposition of calm nonsense ideological justification and vicious murder. But it also is remarkably devoid of that emotion that usually accompanies genocide—hate. Thanos murders out of sincere love and compassion; he wants to help the people he kills.
Of course, genociders don't think of themselves as evil. But they don't think of themselves as evil because they don't believe that the people they kill have moral standing. Hitler didn't murder Jewish people to help Jewish people. He murdered Jewish people because he saw them as a subhuman, verminous threat to human beings—i.e., Aryans. Murdering Jewish people, and Roma, and political dissidents was justified the same way you justify killing rats—because they are vicious, subhuman, and carry diseases, and you need to get rid of them so that virtuous humans can thrive.
Even Malthusian arguments in the real world are linked not so subtly to hate and prejudce. Malthus believed that population inevitably grew faster than food supply, and that therefore famine and starvation were inevitable—for the poor. His theories were used to justify harsh indifference to the plight of the needy, who were supposedly doomed by inevitable economic law. The most horrendous result of Malthusian theories was the Irish potato famine, which was caused by a potato blight, but was badly exacerbated by British Malthusian conviction that it was best in the long run to let famines run their course, rather than trying to ameliorate them. Around a million people died in Ireland while the British refused to even halt grain exports from the country. As Assistant Secretary to the Treasury Charles Trevelyan said, the famine was an “effective mechanism for reducing surplus population.”
That surplus population wasn't evenly distributed across rich and poor alike. Rather, the poor in Ireland died even as the rich in Britain lived lives of luxury. This caused little public outcry, because the British saw the Irish as racially distinct and inferior.
Thanos' even-handedness is, presumably, intended to make him a more identifable and nuanced figure. But rather than humanizing him, Thanos' universal compassion makes him irrelevant to actual human violence and injustice. You can't learn anything about the dynamics of prejudice from Thanos, because he has no prejudice. You can't really learn about evil, or opposing evil, either, because Thanos has nothing to do with how political evil functions on earth. Thanos wants to kill all groups equally, so of course it's easy for all groups equally to see him as a threat.
But what if instead of wanting to wipe out all people equally, Thanos came to earth and decided to reduce the population by, say, killing everyone in India? There aren't any Avengers based in India; how long would it even take the superteam to notice that anything was wrong? How could the film engage audience sympathy when none of the characters from the previous 18 films are directly affected? Or imagine that Thanos decided to kill Jewish people, or queer people. Would all the Avengers see this as a threat requiring them to drop everything immediately? Or would it seem to some of them more distant and less pressing? Would they all risk their lives to defeat Thanos if, when he snapped his fingers, all the trans people on earth disappeared? How would they even know, since trans people are never represented in the MCU?
The MCU avoids engaging with actual genocidal ideologies in part because those ideologies rest on prejudices that the MCU itself reproduces, and which it can't necessarily count on its audience to reject. A Thanos ranting against immigrants is a Thanos who could conceivably be viewed as a hero by some not insignificant portion of moviegoers. A Thanos who hates black people would make you wonder why Wakanda is at the edge of the narrative rather than the center. A Thanos who hates queer people would raise uncomfortable questions about the lack of LGBTQ representation in the Avengers.
Thanos' egalitarianism serves as a kind of displaced excuse and apologia. The MCU is so free of prejudice that even the worst entity in the multiverse is untouched by hate. Thanos is given a foolish, nonsensical motivation so that you don't have to think about the issues raised by a more realistic genocidal ideology.
The MCU appropriates past atrocities and suffering, but doesn't want to acknowledge the people who actually suffered, in the past or the present. Infinity War imagines an equitable fascism—and equitable fascism doesn't exist. The fight against Thanos is not a fight against evil, but a distraction from it. Avengers 4 will resurrect all the fallen heroes, and why not? Their random deaths were, from the beginning, intended to be meaningless.