I’ve said this somewhere before, don’t know where. When players collect Shame/Reprimands, they are encouraged to spend it for some of the less severe consequences, such as an antagonistic NPC. If they amass enough Shame/Reprimands for a court-martial, I (as the GM) am likely going to spend it for them, so I will just force a court-martial. Because for me it makes no sense that players would actually choose this, except for RP reasons. So there is no double punishment in my mind.
I’ve watched a lot of JAG back in the day, so this is essentially my only reference material on the subject. Depending on the case, consequences can reach from none to life in a penal colony (see Tom Paris), which would effectively result in the character’s end.
Ideally, I would have a player or PC handle the defense and I handle the prosecution. If the GM does both, it’s kinda lame. If the players can be impartial, they could even play the jury or the judges panel or whatever they have in Star Trek. So at least everyone gets a good adventure out of it.