I guess its up to the audience to make the judgement. I thought it was the right call given that it was public insubordination in the middle of a battle, and had the potential to instigate mutinous action.
Well, since there was nobody left who could theoretically discipline Cain, mutiny was the only remaining thing that could potentially correct her decisions. Therefore mutiny actually became a necessary
tool in the absense of alternatives.
Under normal circumstances, Cain would report to the Admiralty. The Admiralty would be appointed by the president. And the president would be elected by the people. Under such a system, the crew of the Pegasus could vote for an authority who would ultimately also control their own ship commander. All of that was gone though and Cain didn't bother to install any replacement mechanism. A sensible solution would have been to pass some kind of decree that the three most senior officers of the ship could remove the CO from command by unanimous vote or something like that (and that court-martials of any cremember can only be conducted by a panel consisting of said officers).