As farcical as the whole flag/constitution/"I pleb nista" schtick was, the real tragedy of the episode was that they brought back a first-rate character actor like Morgan Woodward, made him an experienced starship captain, and then made him corrupt to the point where Kirk had to bring him down. That was just plain sad.
If they were going to bring Woodward back as a starship skipper, they should've given him a story where Kirk and Tracey were on the same side, both of their ships facing a formidable danger together, and both captains working together to do the right thing. Instead it literally became a macho knife fight.
As was covered (by Captain Tracy, no less

) on another thread, the whole flag-waving thing could have been easily circumvented - and made for a much MUCH better episode.
Suppose that the planet had once been home to a Human (or near-Human) pre-warp civilization that had blasted and germed itself back to feudalism or lower in a massive war. No Yangs or Kohms, no artifacts from the USA, nothing like that - just the remnants of the two sides still warring.
A few centuries down the line, enter the USS Exeter. Whilst Captain Tracy is on the surface hobnobbing with the locals, a particularly nasty germ is inadvertently carried back to the ship and wipes out the entire crew.
Captain Tracy is resigned to his own death, until he discovers he has been miraculously saved from that
and may now even be immortal. Add to that the enormous feelings of grief and guilt he feels about the loss of his entire crew. Add to that several weeks / months of isolation from Star Fleet. Add to THAT, the local situation - the friendly "civilized" locals under constant and relentless attack from much more numerous "barbarians".
Under those circumstances, it is small wonder that Tracy eventually cracks, throws the Prime Directive completely out the window and starts actively interfering. He uses his Phaser and any other equipment he might have had to thoroughly smash a number of barbarian attacks.
Then along comes Kirk and Co.. Kirk may sympathize with Tracy and all that he has been through ("
There, but for the Grace of God, go I." etc.), but he has to stop this interference.
Overall, very much like the original episode, just without any flag-waving and with more emphasis on Captain Tracy's moral / ethical slide. Could have been a quite powerful pro-Prime Directive styled episode.