Here is an idea - no scripting required. I haven't tested this, but it *should* work (famous last words) based on what I know about the spindle operation. You will need to change to using M3 to fire your torch and M5 to turn it off (i.e. map the "Spindle On" output signal to your "torch fire" output instead of the "Coolant On" or "Mist On").
(1) Go to Configure->Mach, and on the "Spindle" tab, in the first row (labeled "0"), set the "MaxRPM" to some non-zero value, say 100. Set the "Accel Time" to some VERY large number of seconds, way beyond the worse case time you expect the torch to be ready (say 3600, or 1 hour).
(2) In the "Input Signals" tab, scroll down to the bottom of the list and look for "Spindle At Speed". Map that to the ESS input that corresponds to the "Torch OK" input (ESS port 2 pin 9, according to your first post).
(3) In the "Output Signals" tab, un-map the "Mist On" or "Coolant On" from your torch fire output pin. Then map "Spindle On" to your torch fire output pin.
(4) Click on "OK" to save all of those changes.
(5) Edit your GCode file and change all of the M7 or M8 commands to "S100 M3". Also change any M9 commands to M5.
What this *should* do is when Mach4 executes the "S100 M3" commands it will turn on the spindle to 100 RPM (RPM is irrelevant to your use but crucial for the next step). Mach4 then waits for either 3600 seconds *OR* the "Spindle At Speed" input to go active, which ever comes first. When your torch OK signal goes active it tells Mach4 to stop waiting for the spindle accel time and go ahead to the next instruction. If the torch somehow is never able to start, hopefully 3600 seconds will be enough time for someone to manually halt the program.
If that doesn't work, or it too kludgy for you...
How about coding this in the M6 tool change macro? Or pick an otherwise unused M code (such as, say, M10 through M45, according to the "Scripting Manual.pdf" page 10 under "scriptable M Codes). Then just insert this M code in you GCode file after the M7 or M8 that turns on the torch. You will need to map the "torch OK" signal to one of the Mach4 "Input #" inputs, and then read the value of that input in your Lua code and wait for it to go to a "1".
Bob