Many GPS navigators on the market offer an emergency automatic landing capability. It's simple enough to add an altitude sensor open to the cabin that would trigger an automatic landing at a couple thousand feet over where the masks automatically deploy. That would give the crew time to get their act together before the automatics take over.
Agree squawking 7400 or such would help ATC.