Ok so, it starts and runs. Then after a while it stops. Is it a dead stop or a dying stop like running out of fuel and after firing. That would suggest fuel tank vent blocked. Air pressure equalises and you get fuel flow again.
Sudden shut down rolling down with no after or before firing would suggest ignition or power.
Kill switch, broken wire or damaged and earthing out when you hit a bump maybe. Check loom around rear suspension. Although after a bump shut down type earth it should start straight away.
Ignition break down then stop suggests something getting hot, resistance increases, after cool down it starts again. Hence reseating plugs may clear any corrosion or gunge and you get a good contact.
Rpm induced shut down. Alternator nut comes loose, air gap closes or contact with pick up. Rough running is often involved before it really does damage.
Everything has a resistance reading or voltage. ECU runs on 5V but components can get dry joints or restistors and other electronics bits crap out. You’ll see them when you have close look at the board. Black marks are heat related. Dry joints can be seen with magnifying eye piece and get in close. The solder will be cracked around the blob, usually complete circle. Resolder effected joints.
Reseat the ecu plug and make sure a tie wrap holds in locked position is first port of call before ECU inspection. Had one where every time the race bike lifted the front wheel the bike shut down. ECU mounted at front on an angle. Give it some G and the unsecured plug moved enough to cut power, then when it came down again it would fire up. Tie wrap fixed that.
Marvin was kind enough to sell me a P8 that was intermittently failing. By the time it got here transport handling revealed the long bit mounted vertically with multi prongs completely detached from the board. Soldered it up and away it went. I use it for testing and fault finding now. Simple ecu swap out check.
The big trick although time consuming is gather information, before the stab in the dark component change. Can get expensive real quick.
I spent 5 hrs going over a tricolour, after the other mech said he gave up. Just told me it ran rough. So out with multimeter. My bad, I should not have trusted him about the engine run. Fired it up after finding nothing. Big rattle from alt cover. Surprise, nut had come loose and was just starting to mash the alt cover.
Pick ups have resistance, but multimeter may show this phasing numbers if you have 2 and they behave the same, they be good.
The battery being new is a good place to start because you have clean power from it. If it’s charging correctly, not getting hot or swollen. Move on. When a cell goes down it can give a few failure sign, from intermittent rough running to shut down, not giving enough flow under load even though it appears to be charging and holding voltage. Lithium batteries can give you gyp as the circuitry shuts them down before the dump everything all at once and melt.
If I think of anything else, I’ll let you know.
Always a bit dicky remote fault finding. Having the machine in front of you is a lot easier. 😄