It's a caricature, yes, but it's never "humans are this," or "humans are that," but humanity in these fictions is just a set of idea. Like how Jews to Nazis, communists to religious people, etc. The people of humanity don't actually exist.
In a sense of they're being characters. all their actions, and dialogues is to give us readers a certain image of what the author intent for us to see. Sometimes, it's as simple as those authors just hate humanity and all that. In this case, there's nothing we can do.
To answer your thread question, those fictions are under the scope of "we humans can do better." There's no fear of some community would get superiority complex from what they read of these fictions. Why? Simple, because elves don't exist, dwarves don't exist, dragons don't exist, hobbits don't exist, orcs don't exist, and all those fantastical creatures. Are we going to complain racism against people who don't exist now? I know by this point you already know, but all these fictional races are also caricatures of their own. WE DON'T SEE ELVES EXACERBATING GLOBAL WARMING IN WRITINGS SIMPLY BECAUSE THEY DON'T DO IT. You know who enslave, genocide, and done all that horrible acts? Humans. You want to see humans saving us from elven genocide? That's WEAK. That's like, demonizing people who don't exist.
Perhaps you just want to read fantasy stories where authors don't do these caricatures. But it's something too good to be pass. Especially when you can already exaggerate irl humans' good qualities in fictional races.