As long as you trust the pilot with absolute authority over which equipment is running, this isn't going to happen. If something can catch fire (as in, any electronics?), it needs to have some kind of local breaker that the flight crew can switch off. The only trusted equipment there is one doing passive recording of some elements (the flight recorder).
The airframes do usually have various ELTs and beacons that can activate in a crash, but some (most?) can be disabled in some way (in case they’re accidentally on) - and others are only short range/directional.