I had similar problems ones. Turned out to be a corroded connector to the battery in the trunk at one point, and a few years earlier, the connector in the engine bay had the same problem. Worth a look?
Imola Red / Imola Red ///M5
E60 SSK, Dice iPod, Illuminated ZHP knob, MKIV, Euro Armrest, GT ExhaustDaily:
BCR Coilovers, 19x10 + 19x11 Rial Daytona Race, Michelin Pilot Super Sport
'04 E55 AMG Brilliant Silver on Anthracite
'96 318i Alpine White on Black
'01 330Ci Titanium Silver on Coral Red
'96 328i Jet Black on Black