About the only thing I could think of is some way for people to report a problem like this and air traffic controllers on the ground having a way to take over control of the plane from people inside the plane. But that too could have problems (what if the air traffic controller on the ground is the murderous one, and now he is crashing planes that the pilot can't control).
I think it's a near impossible problem to fully solve. The closest thing I can think of is positive train control (PTC) which sets safe boundaries and overrides the operator if the train exceeds those boundaries. In this case maybe the plane simply can not be flown into the airspace around the Alps no matter how much the pilot wants to.
Even then, there are considerations like not allowing the cockpit to kill all com links / power so that people outside the cockpit are still able to communicate with the ground to get the root pwd, and as mentioned elsewhere the person inside the cockpit could change their strategy to make recovery of control difficult or impossible even in this case (EDIT: e.g. throwing the plane about). Also, you'd probably want >1 ATC person to authorise to reduce the chance of the door being unlocked by someone at ATC in cahoots with hijackers.
We just told the guards to sod off as we had our own private transport plane we were waiting for. Who on earth would hijack their own plane? Especially as there were 30 armed people on board?
That's the safest way to travel!
Let's accept it: we may make things gradually better, but there is no silver bullet that would solve all these problems.
To prevent attackers from muting all but the required majority of crew members, sensors all over the plane must be able to record any emergency code words spoken in the event of an attack, which will enact certain security measures (depending on the code word could lock or unlock the possibility to enter the cockpit, notify air security etc). This system should of course not be able to be deactivated.
And if you really wanted to make things sure, you could install majority-authorization buttons on every seat setup to be pressed by a percentage of boarded people within a period of mere seconds, which would allow the people on the plane to make a decision. For an attacker it is not possible to make all those people press the button, since he would not know who is not complying.
Of course you can also have some remote mechanism of unlocking, although the security implications of remote authorization and transmission of commands would be complicated to get right and open too many attack vectors.
Thus rendering the doors essentially useless, as hijackers threaten to kill passengers one-by-one until the crew (who will generally outnumber the 1-2 people in the cockpit) open the door.
Any procedure that aircraft crew is supposed to handle also needs to be something that is trained, memorized, and practiced regularly. Certain simplicity is ideal.
For instance, to replicate someones fingerprints all you need is a high res photo of their hand from a distance.
Then the airline will move on in the arms race by responding with a fingerprint reader that wants to have a pulse in the finger, and then it doesn't work when the user is in distress and has an extremely high pulse. And then there is an accident and we the armchair security experts come up with more bright ideas.
Last time I had an airline meal, even in first class, the knife "blade" was hard rubber mounted on a blunt metal handle. It could barely cut the food cleanly, never mind someone's finger.
If the pilot of the EgyptAir Flight 990[2] could not keep his co-pilot from crashing the plane, what could a mob of random passengers realistically do? It seems to me like the DRM problem - you can't protect the pilot and keep them from hijacking the plane at the same time.
At least the doors will prevent any of the other random 150 passengers from taking the plane. That does seem to me like an improvement.
[1] https://www.schneier.com/essays/archives/2005/12/airline_sec...
[2] https://en.wikipedia.org/wiki/EgyptAir_Flight_990