Logic circuit for not accidentally driving a GPIO output
Something like this would do the trick if the firing of your device is not absolutely time critical. It requires a string of 0101010..... to allow the small cap to pump enough charge into the large cap to fire the schmmit triggered buffer. The cap and discharge resistor on the input to the schmitt will make it stable at power up.



simulate this circuit &ndash; Schematic created using CircuitLab
You are absolutely correct in avoiding DC signalling in this type of situation. In addition the software should be structured so that this output is only ever controlled from one place (subroutine) and that this subroutine carries out all the safety checks before this is fired. (do you want to fire? are you sure you really want to fire?......)