Will this circuit manage to kill a 2-stroke engine?
I think the magneto peak voltage is definitely too high for D1/D2, probably the optocoupler and maybe the MOSFET (no part numbers being provided).
Try replacing D1 with a 1N4007 and and replace the optocoupler/MOSFET with an opto-MOS SSR.

Edit (for general info): The objective is to replace this kind of &quot;kill switch&quot;

A magneto is a permanent magnet generator that forms part of an internal combustion ignition system that requires no battery or electronics of any kind, just the magneto itself, contact points that open at the appropriate time to generate a spark, and an ignition coil. They are used on small engines and on many light aircraft (in a dual configuration) where it is very undesirable to have a failure that causes the engine to cease rotating.