I can think of one way. There is a mavlink command to terminate flight. It shuts down the motors.
MAV_CMD_DO_FLIGHTTERMINATION (185 )
[Command] Terminate flight immediatel