I just got an account today... However, on other cars I've seen with those symptoms, I've suspected a vacuum leak or insurgence of air somewhere in the system. I've diagnosed such problems by spraying a little carb cleaner around the intake or breather. If the idle settles and improves a few seconds after spray, you're on your way to finding an air leak. But, like I said, I have 0 experience with BMW's. I just got mine last week. You're probably right, as sophisticated as these cars are, it is probably something electrical - that I obviously wouldn't know about.
Just a suggestion. Hope no one bites me for my post. For all I know, BMW's might not even have vacuum lines!