Riker not accepting a promotion to captain didn't make sense to me in-universe. You don't go straight from 1st officer aboard a big ship to command of a big ship. You go from 1st officer of a big ship to command of a small to medium ship, and then to command a big ship. It gives captains a chance to work up to the hard job a step at a time. Even if Picard was killed or something, the command of the Enterprise would go to someone who'd been captain of a medium-sized ship already, not to Riker. In a realistic series, he would have been separated from Starfleet the second time he turned down a captain's job, in order to give one of the Lt Commanders a chance to move up to Commander.