Sometimes ignorance helps
Wow. Pretty esoteric stuff. My car was behaving exactly the same way. It was a few months after buying the vehicle used and I didn't know Mercedes from Adam (I have always owned BMW). I did two incredibly simple things that fixed the problem forever, and I have no idea which one of these two was really causing the stalling episodes, but I have my suspicions…explained later. First I removed and reinserted the large rubber-headed electrical connectors on the left inner fender. Then I removed the battery terminals. The contact areas of the terminals were black. I cleaned the battery posts and the inner surfaces of the terminals with the special terminal cleaner brush, and sprayed Exide Battery Protector (the red stuff) on the contact surfaces, and reconnected the terminals. The stalling has never happened again. I suspect that there is a component that goes haywire if the battery cables momentarily lose contact with the battery.