Yeah, TV Tropes always has me in stitches!
In the Star Trek
section of that article, once again, they nail it:
A Star Trek: The Next Generation example - in "Where Silence Has Lease" an alien face on the viewscreen says that he wants to understand death by way of killing about half the crew and starts by killing the pilot, the spot normally manned by Wesley Crusher. But he's away from the post at the time, the only time in the whole episode, replaced by a Red Shirt black guy.
This was so embarrassing when that episode aired.
In an alternate timeline of Star Trek: Enterprise wherein the Xindi are successful in their genocidal bid to eradicate humanity, Travis Mayweather is the first of the main characters to die.
An aversion: Early in the Star Trek episode “By Any Other Name”, the alien Kelvans reduce two Red Shirts to blocks: Lieutenant Shea, a black guy, and Yeoman Thompson, a woman. The Kelvan leader crushes one block, killing that crewmember, and restores the other block; Thompson’s the dead one, and Shea is restored to normal.
And wouldn't you know it? The article discusses By Any Other Name,
basically as if it rubs up against the trope.