Star Trek series were generally aired during a family-viewing time (i.e. after five but before nine). Among other things, TNG alone was throwing out several episodes dealing with heads blowing up, heads being blown off, human laboratory experiments, bloody death scenes, psychological and physical torture (that were advised on by the folks at Amnesty International) and let's not forget the Borg ... you have to wonder whether this was always a good idea.
Never mind that there was quite a large volume of Star Trek-themed toy merch during the heyday of TNG. Hey kids, don't you want a toy of the big cube filled with techno-zombies who want to rip open your flesh and take away your human soul? Sure you do!
DS9 is even worse. The series begins by showing us the horrific Battle of Wolf 359. In TNG, this happened off-screen, and we only got to see the aftermath. In Deep Space Nine, we see it up close and personal as thirty-nine ships are destroyed, resulting in the deaths of thousands. It only got darker from there. By the end of the series, it had featured racism, intolerance, a hefty dose of War Is Hell, Family Unfriendly Deaths by the dozen, genetic modification and slavery, Mind Rape, maiming, protest by suicide, a form of human hunting, PTSD, genocide, backstabbing politics, poisoning of entire planets, and lots of terrorism (with Your Terrorists Are Our Freedom Fighters being one of the series' central themes). And a lot of this was done by the heroes, with the show wavering between Grey and Gray Morality and Black and Grey Morality depending on the situation. Deep Space Nine was anything but meant for kids, likely being one of the darkest pieces of work to ever come out of the franchise.
And in TOS alone there's plenty of this. How about the episode "The Paradise Syndrome" where Kirk gets married to a woman, gets her pregnant, and then she gets stoned to death. On camera. Yeah.
"Miri", with its facial disfigurement, homicidal mania, and children under threat, caused a big row in the UK when it was first broadcast. This led to it and three other episodes being left out of UK showing of the series until the 1990s.
In the opening moments of DS9, we saw Jennifer Sisko, trapped under debris, dead or dying, the room burning around her as her husband desperately tried to reach her. By season five, they were including scenes of Starfleet officers dying from gruesome injuries. And then there's the Dominion War...
In a similar vein, Enterprise's "Unexpected" is also about rape as a joke. It falls somewhere between date rape and child molestation. Sure Trip's an adult, but the lizard lady's dialog just screams "I've got candy in my van". Calling her sexing up of Trip "a game we play" when he doesn't know what's happening.
Lets not forget Deep Space Nine's "The Siege of AR-558" which features the Dominion's shock troops attempting to reclaim a communications outpost that had been seized months earlier by the Federation. The Defiant shows up to provide supplies at first, but the crew remains behind when The Jem'Hadar sneak attack Nog and they realize a siege is inevitable. He winds up losing a leg due to that and what follows is a quite violent fight against a horde of shock troops, all while classy jazz music plays, thanks to Bashir having a recording of Vic Fontaine singing.
Charlie X features the titular character, who can be summed up as Anthony FreemontIN SPACE, and with even worse fates for anyone who crossed him (at least Anthony's victims were Released to Elsewhere after their transformations). Oh, and he blew up a ship, stalked a yeoman and killed her when she slapped him, and forced Spock to recite poetry instead of fighting. And the race that adopted him terrifies him, to the point where he's begging the same people he was just bullying not to let them take him away.
Patterns of Force had apperances from the totally kid-friendly Nazis! Complete with racism! Germany had this banned until at least the late 1990s (and even then, it was edited and changed so Nazis wouldn't be mentioned or seen).
Opperation: Annihilate! has Kirk's relatives and a good many other people die horribly, with the only survivor being Kirk's nephew.
Space Seed introduced everyone's favorite madman Khan Noonien Singh, who was introduced by suffocating Kirk, Uhura, and Spock in the Sickbay Room. And he got worse in the sequel.