Your experience with Electromagnetic Interference (EMI) struck a resonance with me. Ignition systems generate an unbelievable amount of high-frequency energy that can couple into any circuit they happen to be near. Analyzing coupling between circuits is anything but intuitive. I spent a good part of a 40-year career dealing with EMI in aircraft avionics systems, and it can be done, but it's a humbling experience. H-field (magnetic) coupling is the culprit more often than not. Visualize the path the spark current takes and how it might couple to the control circuitry, either through common impedance (like a common ground path) or by H-field coupling (like between parallel wire runs). Try to assure a single-point ground reference between the spark stuff and the control stuff, and keep the control stuff away from the spark current path.I attempted to use an Arduiuo to control the timing advance of my model engine and could never get it working. the Electromagnetic Interference from the ingition system always (eventually) killed the micro controller. I went from a CDI to a TCI (transistor controlled ignition) which was supposed to be quiter from an EMI standpoint. I used resistor spark plugs, I used a ballast resistor, I isolated the microcontroller, I used lots of local decoupling caps and an inductor isolation circuit with an encolsed metal case, I used a seperate battery and opto isolators.... I spent way too much time trying to get it to work until I finally abandoned the project. If you can get the arduino working, you need to let me know what you did. I wrote some really neat code to control the spark advance, but to no avail. Good Luck.
Experiment. You will probably be amazed at what actually works! Good luck.
Don