STAR TREK's not the answer to Kleenex, much less what you're going through. I mean ... how many social issues have been brought up in this franchise and just how in-depth did it ever get with them? What viable, usable, sustainable solutions were ever offered to any of them?
Kirk sees a situation like what we're coping with on Earth "right now," decides he doesn't like it and "pulls the plug" on the ONE computer controlling it all, or roughs up the ONE leader causing it and carts him off, or kills him, then leaves the natives to deal with the aftermath, themselves. Often .... with the promise of later Federation aid, to assist.
But we never get to see that, or what the final result might be. We're just left to assume that because Kirk does a thing, then it's enough to know everything's going to be alright. The show only uses social problems as an excuse to get our Heroes into and out of mischief. And the feel-good ending just reminds us that at the end of every dark tunnel ... there's a light of hope.