You are having some sort of electrical problems. They may not be related to the engine problem though.
You may want to check the fuel pressures, I have seen fuel pumps cause lean problems. The other thing is that coolant temp is about 50% of fuel mixture on that car. When you unplug it, you are setting the computer to a fixed value. You may have to get professional help for this one.
ASE CERTIFIED MASTER AUTO TECHNICIAN
MERCEDES SPECIALIST 11 YRS