Well I'm no expert and there are people on here with more knowledge of BM's but its failing ignition wise or fuelling wise, if it was a Ford I would be of more help. I've had similar problems on Fords with ICV's and vacuum leaks, MAF issues or similar with regards pre ignition sensors. Is it definitely firing consistently on all cylinders? I've had experience of coil pack failure or arcing when the casings crack. To be fair a proper diagnostic sounds like its needed. I recently purchased an E46 with low miles and full history, however I've so far replaced rear springs, front wishbones and bushes and other items to tedious to list, in short your not alone :) As a footnote, the most reliable car I ever owned was a Honda, this hype about German engineering isn't quite as it appears.