Every plane that I can remember flying had an auto shutdown feature on the ground in case of APU fire. It must be a certification thing. The APU can be running with no crew aboard for aircraft servicing. There is also an APU fire control panel in a wheel well usually, with a fire bell that goes off outside the aircraft. The APU fire extinguishing systems are connected to the hot battery bus. I don't know what that bus is called on the 787.
Unfortunately for the 787, there is no certification requirement for auto battery fire extinguishing, or a battery ejection seat in case of battery fire on the ground.