This is obviously a very bizarre and incomprehensible incident to most of us. As others have suggested, banning jump seat commuters is not the answer. The only saving grace is this particular pilot was not actually flying the aircraft himself. The authorities are already adamant that it was not related to current world events or terrorist endeavours. It seems very likely that this was some kind of mental health episode - possibly assisted by the presence of illegal or prescription drugs. It is almost impossible to prevent this type of thing happening very occasionally, as pilots are ultimately human beings, with all the uncertainties that may bring.
I am not a Boeing pilot and have spent many years on the Airbus instead. Unlike the Boeing, on an Airbus it would be incredibly easy to shutdown both engines in flight in a couple of seconds. Although I much prefer Airbus overall, this is definitely an area where Boeing appear to have an added safety advantage that was very useful on this occasion!