^Your post has got me thinking about archetypes that haven't yet been filled by Trek captains. I'd be interested in meeting a captain who's fallen somewhat out of favor with Starfleet, perhaps someone who broke too many rules or was involved in a serious incident at his previous posting that led to his being reassigned and promoted not because of merit but because no other commanding officer would have him as an XO.
Generally speaking, you don't get promoted to Captain because no one thinks you'd be a competent XO - that Captain slot would get filled by a proven *good* XO, and you would probably get drummed out of the fleet or requested not to reenlist at your next re-up.
Unless.... it was right after a war or another event that managed to thin the ranks, and the ship you're given captaincy of is some minor, non-critical vessel. A tug or a courier or something. And then somehow events propel this ship into being a hero ship, somehow.