Likely to be the ignition module on it’s way out. That’s what I’d be looking at on this engine. Trust me everything adds up. Mileages, going at higher constant or building revs at first a little then more then on and off at all revs, that engine, Cheap and easy to fit another yourself( breakers / recyclers maybe , ebay or eurocarparts / GSF etc) IMHO. Then see what it’s like. If it still does it then look at other causes.