hey ICEXX99, [ I'm re-posting my previous post as I did accidently deleted it ......], anyway I guess 1st it's the Coils !
2nd. the crank shaft and/or camshaft pos. sensors ..... [the aftermarket ones are not OEM's you know what I mean

- change it again]!
3rd check/change the OVP & fuel pump rellay's --- they might just stick on hot engine !
yeah to replace the Fuel Filter is not bad idea considering your X5 is '01 - but still depends on the miles that you have !
regarding the Coils just read this:
All BMW 8-cylinder engines from the mid-90s use a multi-coil ignition system, where an ignition coil is mounted directly over each spark plug. This design eliminates the need for ignition wires and distributors, with their attendant caps, rotors and other mechanisms. The ECU uses signals from crank position sensors to trigger timing and spark sequences. Due to the elimination of components, reliability is increased. With one coil for each cylinder, a no run situation due to coil failure is eliminated since all the ignition coils would need to fail at the same time for the engine to become inoperable.
Checking for a bad coil is not difficult. To do this, remove any cover from the ignition coils with the engine off. Then, release the clips for each coil’s signal wire plug. Unfasten the clips only. Do not remove the signal wire plug. Start the engine and starting from a particular coil, remove the signal wire plug. If the engine starts misfiring, this indicates that that particular coil is in working order. Repeat this test for all the ignition coils, working systematically. Use insulated gloves when performing this procedure to eliminate the chance for an electrical charge from the coil jumping to your hand. It’s not a pleasant experience, to say the least. When you find an ignition coil that makes no difference to the engine’s idle when the signal wire plug is removed, you will have found the non-working ignition coil.