So, until this point, the most offensive Star Trek episode I remember was probably that time that displacing an entire planet of NDN colonists turned out to just be the B-plot device for illuminating Wesley Crusher's manpain and allowing him to walk off with the Traveller into the space/time continuum
And actually that one is probably still worse, to be fair, because at least Chakotay is an NDN character and was allowed to be the main character of this ep.
But so anyway, what happens in Voyager 2x02 "Initiations" is that Chakotay's shuttle is attacked by a 13-year-old Kazon alien who wants to kill him for infringing on their territory. (The Kazon are a tribal culture who wear lumpy foreheads and are painted red, and whose hair is in fuzzy afros with things sticking out of them.) The kid, who is played by the guy who played Nog, fails to kill Chakotay, who saves his life, and then they both get captured by the kid's tribe. The kid, because he failed to kill his designated coming-of-age prey, can now not become a man in his tribe.
The Kazon chief comes down and has a shouting match with Chakotay, who is trying to say that Voyager doesn't want to be these guys' enemy, and utters lines like:
"Everything you are is a threat to us... the Kazon fought long and hard for their independence from uniforms like yours"
"Your uniforms... your laws... your technology... you are not welcome here."
Then Chakotay, THE SINGLE NDN CHARACTER IN THE SHOW (who is actually played by a Mexican American guy) and also a former ANTI-FEDERATION Maquis freedom fighter, is made to stand for the enlightened colonial culture in a split-screen nose-to-nose faceoff... with the angry anti-colonialist violent savage played by a white man in LITERALLY RED redface.
Chakotay thinks 4 small children approximating the ages of the kids from the Sound of Music have been called to the bridge to witness his execution, but it was actually to witness HIM killing the child who failed to kill him. He refuses and escapes, offering the kid the opportunity to flee with him rather than be executed, but the Kazon shoot down their shuttle and they land on the moon and have to stay overnight before being rescued by Voyager. (Chakotay offers the kid the opportunity to kill him in order to gain his adulthood but the kid decides to shoot the chieftain instead and everyone goes away happy except the dead chieftain.)
So anyway, I was thinking that the standoff between the redfaced 'savage' chief and the civilized Federation Chakotay was done deliberately - still gross, but it would have been making an attempt at commentary. However, then I looked the episode up on Wikipedia, and it seems that wasn't the case at all.
Executive producer Michael Piller was displeased with the depiction of the Kazon in Biller's first draft of the episode; where they were supposed to be analogous to street gangs in Los Angeles, they were instead "coming across as warmed-over Klingons." In addition to J[e]ri Taylor's already extensive notes on the draft, Piller suggested Biller get in touch with actual gang members or a police officer who could better clue the writer into street gang culture for the episode. Instead, Biller picked up a copy of Monsta, a book by convicted murderer and former gang member "Monsta" Cody. The book's insight into gang life and culture was a guiding light for Biller's second draft, which he worked up with Piller, endeavoring to set the Kazon apart "from Romulans, Cardassians, and Klingons." wikipedia
(This is probably the source of the symbolic coming-of-age kill, the shifting territories, and the emphasis placed on signs and insignia at the beginning of the episode.)
Michael Piller commented, "Here we were, on the first day of prep and Ken started rewriting that script based on my feelings that we had to get to the guts of what drove the Kazon and they had to be different from Romulans and Cardassians and Klingons." Piller concluded, "It was a choice of settling, or doing what I considered excellent work. The bottom line is we had a better show, because Ken did research."
This episode's story itself was a problematic one for director Winrich Kolbe. He explained, "Storywise it was not the most interesting show I've ever done. It was a push. My problem with the Chakotay character was that I wanted to forget the Indian aspect and make him the Maquis that he was supposed to be. I knew Chakotay would have to eventually cooperate on the ship, but I hoped he would do it unwillingly most of the time. I talked to the writers about it, why we weren't playing that conflict. They went with the Indian thing, which was kind of intriguing, but in my opinion, never paid off because it was done too subtly." memory alpha
I still find it hard to believe that the transposition of the NDN character - especially when the director explicitly underlines that they were "[going] with the Indian thing" - with the Kazon's anti-colonialist speech was accidental. But maybe emphasizing the word "uniforms" repeatedly was supposed to suggest encounters with police (which wouldn't make sense because the uniformed people the Kazon encounter aren't police with authority over them...)? But apparently the producers and writer regard their attempts to make the Kazon into street gangs as successful, and the episode simply an opportunity to develop Chakotay's background and give him some action scenes.
I... well. I don't cry easily, but I did lie limply on the sofa moaning "whyyyy is Hollywood" for a while.