...After which you'd still have to answer "Are you sure?" "Did you think this through?" and "Perhaps you'd like to consult your fellow officers, especially the Medical Officer?" sixteen times or something, apparently.
A logical system would simply require the input of, say, three officers (or any number user-selectable by the CO or by a council of top officers). These could be lowly Ensigns for all the computer cares, as it's quite possible that the ship would be so badly hurt that only these three would survive and the sensors would be too badly damaged for the computer to establish whether or not this were true. But the thing would be, if the three Ensigns order self-destruct, a trio with higher ranks can override them. But if Picard, Riker and Data say that the ship must die, then officers of lower rank cannot override them.
destroying the ship doesn't extend to suicide, at least not for Janeway
Actually, Janeway is the only starship skipper hero to have activated self-destruct with the actual intent of blowing herself up along with the ship.
Picard set self-destruct in a gambit to scare off Nagilum and the Bynars, hoping that the enemies would yield and the self-destruct could be cancelled (and this is what happened in both cases). Kirk likewise made threats against Commissioner Bele - but when he got the opportunity to actually blow up the ship rather than just bluff with the concept, in a bid to stop the Kelvans from taking over the galaxy, he said "Are you mad?"... Sisko neither bluffed nor attempted self-destruct.
Threatening with self-destruct and trying to blow up the ship are two completely different things. One basically always excludes the other!