...Most of the really good Trek shows are stories that are ambitious enough to draw some inspiration from - the heavy "message" shows were always awful.
"The Doomsday Machine," for example, was a story about an obsessed character. That it bore the standard observation that people shouldn't play with big things that go "Boom!" is trivial....
For me at least, this is true about any good work of fiction (book, movie, TV episode, etc.). I get more enjoyment out of an interesting character and great dialogue (especially great dialogue) than I do out of the plot or underlying message.
The plot or message is just a vehicle for the interesting characters to say interesting things.