Corrected entry: Ben's plan is absurd, hiding and pretending to be dead in a ship of over 400. Eventually Ben has to eat or use the bathroom, someone would see him.
Corrected entry: The outcome of the Court Martial is already known before it happens. Since the captain's log is recorded after a mission giving a detail of what had taken place before the log was recorded, Kirk would not have been able to record his own log (as Captain) if he had been found guilty during the trial.
Correction: The outcome of the Court Martial is known to the viewers, of course. If Captain Kirk had been convicted, there would be no more episodes of the show. The point of the episode is to reveal the details of how he was acquitted, as they unfolded, and the Captain's Log is added later as a narrative framing device. This cannot be considered a mistake.
Corrected entry: In the bar scene where Kirk gets the cold shoulder from his Academy classmates, those men seem to be wearing Enterprise badges on their tunics, rather than the badges of their proper ships.
Correction: Given the number of ships in the fleet many of the insignia are likely very similar. The differences may not be obvious at this distance.
Correction: His plan is absurd, which leads to him being discovered, exactly as you say. He's shown to be deranged, if not insane, so this isn't a plot hole, it's a plot point.