Based on your original post, here are some thoughts for you to mull over, and questions to clarify the issue. First, you said "while idling". Does this mean that it only occurs while idling? If so, it means that the alternator is most likely hiding the problem when the engine is running at a high enough rpm for the alternator output to supply adequate current to replace the battery voltage/current. This is significant, as it means that there most likely is an intermittent open somewhere in the supply from the battery to the engine circuits, including the alternator. You said that "the lights go out" - I'm assuming that the only lights you are referring to is the dash indicators. Is this correct? If the headlights and running lights also go out, the problem can only be the battery or associated connections, as the alternator output goes quite directly to the battery lead. If only the engine indicator lights go out, it could be a problem with the supply from the source (Fuse box or circuit breaker) to the engine harness.
Incidently, don't forget the battery ground cable as a possiblilty. Also, don't forget the grounding strap from the engine to the frame as a possibility.
Good luck with the problem, your vehicle is still almost new, MB should assume complete responsibility for this one!
'82 300D/4.3L V6
'85 GMC S15
'77 Jag XJ6