Ok so found a bad connector. The wire to it was almost corroded away.
So I cut the wires, found some new connectors (had some high voltage DC outdoor solar panel connectors lying around), soldered etc.
Now the bike runs like a charm again.
Thanks for the help and patience