This genre of anime is popular but not as popular as some others or the message of it is often missed, this anime sort of anime needs to have moral dilemma, a struggle for liberation, and a colonial theme in its narrative. In my opinion, Colonialism is extremely important for a mecha art piece. My favourite mecha series, Code Geass: Lelouch of the Rebellion really drives this point home, the series is centred around the exiled prince of a British Empire that survived end of Colonialism and now has taken over Japan, stripping away the identity of Japanese people and everyone who lives under its thumb, assigning them numbers and erasing their culture. The anime shows rebellions carried on by the native Japanese against the British, it is a gut wrenching anime at times with deaths which were entirely avoidable and so emotional that they would break you even if you had the strongest will power of all. But that's not all the way mecha shows a brutal history, since the pioneering of the genre in the Gundam series, the genre has set itself apart with its focus on struggle between humans and the problems of the contemporary society.
A mecha can't just be a robot, it needs to bipedal, it needs to embody its pilot, it can't be mecha unless it embodies the one piloting it. A human never chooses the Mech they pilot, a Mech selects the human who will pilot it. There’s little mythology but you will it narratively, no person will be piloting a Mech that doesn't embody them. Mecha genre isn't about an outside threat like an alien invasion or fighting an ancient evil but it is about the problems of the human society showed and solved in mech combat. It is incredible how much this genre made itself immune to bigotry, especially Gundam, being as popular as it is, Gundam still has quite a progressive fan base. The story of Gundam often even invokes themes of war orphans and queer people, those who are usually left out of the conversation in protagonists of shounen anime. Abused people are usually villains but many Gundam series give them the center stage.
Then there's a video game I wanted to talk about, something that to me is the epitome of mecha in gaming. Armoured Core 6: Fires of Rubicon, this game is about corporations trying to extract every drop of a precious mineral from this planet called Rubicon and who are the enemies of the corporations? The Rubicon Liberation Front, yes this game literally about a war between indigenous fighters and conglomerates trying to exploit their natural resources. If Code Geass is epitome of mecha in anime then this game is epitome of mecha in gaming through and through, there's no doubt about it. FromSoftware was quite skilled at making mecha games before Souls series however even they outdid themselves with this one. The themes of Environmentalism and Colonialism are quite open and my lord if it isn't one of the best things I have ever witnessed.