To be fair, TOS certainly presented a notably optimistic view of the future, as opposed to the usual alien invasions, post-apocalyptic wastelands, or sterile dystopias. You had a future that largely worked,
for the most part, but it was by no means utopian, especially out on the frontier. And the people (including aliens) were still recognizably human, driven by the same volatile emotions that have powered theater and drama since the days of "Oedipus Rex."
There's a difference between "optimistic" and "utopian" that Trek revisionists sometimes forget. All I know is that the show I grew up on was not afraid of letting its characters wrestle with anger, jealousy, etcetera, on occasion, like the half-civilized "child race" we were. And the final frontier was not always as squeaky-clean as some people want to pretend it was . . . .