You'd think "don't use a fictional creature as an allegory for oppressed minorities and as a horde of vile automatons that it's always okay to kill in the same work at the same time" would be a no brainer, but roughly 70% of all works featuring goblins and/or robots demonstrate otherwise.
Star Wars using this exact formula with droids blows my mind to this day. Like, they really can’t decide whether they’re actually an oppressed group or genuinely mindless automatons whose inner lives we don’t need to worry about.
Given that Solo: A Star Wars Story features a droid liberation activist who's very obviously characterised as a mean-spirited parody of a women's rights activist and whose concerns are consistently treated as misguided and laughable (before they blow her up and use her brain to repair a spaceship), I'm not sure it's that the writers can't decide so much as it that they don't want to say what they really think out loud.
I know this is included under your original post's "70% of all works featuring goblins" part, but I just have to bring it up again: Hogwarts Legacy. The villain's origin story is that he's part of an oppressed minority who had optimistic ideas about building bridges and fostering better relations between his community and the majority, but when he tried to reach out and initiate this, he was viciously beaten almost to death in a brutal hate crime triggered by the perpetrator's absolute rage at seeing him do something his race was forbidden to do.
That disillusioned him, so he ended up leading an uprising against the oppression of his people. The player's job is to stop him from reclaiming cultural artifacts that were stolen from his ancestors and kill him, thereby quashing the oppressed minority's uprising. Along the way, you get to brutally destroy other members of this minority with total impunity, since they are essentially framed as (like OP put it) hordes of vile automatons.



















