Fried electronics

Hi, 12v dc BGM stator and cdi with original electronic flywheel.. running sweet.. today stops on tick over el pronto. Obvious electric issue... usual check list leads me to the Cdi and to test the stator... removing the rubber cover on the cdi it is absolutely honking, a real acrid smell... no obvious melt down. Check the stator...all good.. Pick up is 115 and LT Coil is good... no spark from pick up despite good readings. Now, the question is what caused the failure... was it a faulty cdi which has fried (..causing a smell you can't get out of your nostrils) the pick up or, the other way around. All the earth are good... I don't want to replace all the fried parts for it happen again... anyone else been down this road?