Hi, I'm not sure my problem is exactly the same but it may help.
Shortly after buying my 2005
MCSa in September the EP light started appearing in the dial. I took it into the dealers for analysis and they told me after a day of checking that the ECU unit for controlling the gearbox had packed up and needed replacing.
It was going to cost over £400 to ship in from Germany and would take a couple of hours to fit which would cost an additional £250 (yes the dealer charges something like £115+vat per hour!!!). Since the car was only just 4 years old I wasn't very happy in being told a non mechanical part has only lasted that long.
The dealer went back to BMW to see if anything could be done as a "goodwill" gesture and luckily enough they decided in my favour and I only ended up paying £190 all in for the part and fitting.
So far so good, but within a couple of days the EP was back again in the display. So back went the car to the dealer and this time they kept it for 2 days whilst checking it all out.
In the end they discovered that it was the actual gearstick unit in the car which goes down and attaches to the gear box. Apparently it has its own wiring loom and where the engine and gearbox move around it has caused a couple of the wires to rub their covering off and short out. This was causing the EP program mode. So they replaced the entire gearstick and wiring loom assembly free of charge (having messed me around the first time) and the problem was resolved. So in the end I had a new ECU and gearstick assembly for £190 which I'm not going to complain about.
Anyway, back to your issue, it may be something similar and therefore I would advise you to ask the dealer to check the gearstick wiring loom where it enters the gearbox as that's where the problem may be.
Hope this helps....