Eh, vetting pilots rigorously seems like it would 99% solve this. That and having more than one pilot in the cockpit makes rogue situations vanishingly unlikely, and that's the best you can do in any safety situation.