Right. I give up.
The M(63)5 isn't running well. It starts and idles fine - even drives fine up to about 3500 rpm, but under load or more than 4000 rpm it misses badly.
I had let it run out of fuel during the winter so assumed fuel would be the issue - it feels like fuel starvation.
In order, I
replaced the fuel filter;
checked the AFM;
replaced cap and rotor arm;
replaced coil;
checked TPS;
replaced in tank pump;
replaced fuel pump.
Any further ideas?
It'll end up at an esteemed M car specialist at this rate.