TOS if they felt like it, could have made a popper ending during either of the Star Trek animated series finales... But they let it ride instead of cashing out.
Doctor Richard Kimble in the last episode of the Fugitive did lock down the one armed man.
Then weren't children.
TV Producers back then could finish a story if they wanted to.
As far as last lines go...
"If I were human, I believe my response would be 'Go to Hell!'" .... even if Shatner ripped off Peter Pan and had another movie after that, was, in my cold dark heart, a suitable conclusion to classic Star Trek.