Hi Moscar,
My money would be on the Igniter (small black plastic thing on the drivers side wing) as your symptoms are exactly the same as mine, I tested Leads, Plugs, coil pack, CAS, ECU and then finally the igniter which I wished I’d have tested first as it is the easiest to get to.
If you have a multi meter then you can compare your readings to mine to see if your igniter is the possible cause:-
Bad Igniter
OC1 - 47.7 tested at 200K ohms
IB1 - 1.965 tested at 20K ohms
VB - 11.7 tested at 20K ohms
TAC - 13.81 tested at 20K ohms
GND - 1.178 tested at 2k ohms
IB2 - 3.19 tested at 20K ohms
OC2 - 2.5 tested at 200K ohms
New Igniter
OC1 - 48.3 tested at 200K ohms
IB1 - 1.792 tested at 20K ohms
VB - 11.75 tested at 20K ohms
TAC - 13.83 tested at 20K ohms
GND - 1.186 tested at 2k ohms
IB2 - 1.79 tested at 20K ohms
OC2 - 48.3 tested at 200K ohms
As you can see the OC2 reading was massively different between the good one and bad one which will hopefully give you something to compare to.
This is a link which may help as well
https://forum.miata.net/vb/showthread.php?t=251644
If it is the Igniter then I purchase a used one from Autolink and a new one off Ebay from Hong Kong which were both around £25 - 30. I thought it best to buy a new one as well because the one from Autolink will have some milage on it so could fail soon.
Hope you get it fixed soon.