The Classic Trek establishes that a captain does have discretionary powers with the Prime Directive. Captain Kirk took a liberal view of the PD, and he was recognized by later historians for the saving of at least two civilizations from destruction. Captain Picard took a more conservative view of the PD, and he was content to let a civilization die.
I think focusing on the PD as one of the reasons for Captain Kirk's demotion was a misreading of the complexities of the PD by the writers. I think sometimes these writers live in a world of extremes, it has to be one way or another.
(On a side note, I didn't find the civilization on Nibiru convincing. Ancient civilizations built their cities around temples. A lone temple, it didn't read "real" to me.)