ASSumming the car is a 1993 300E that has electronic idle control & throttle body, I would have the idle speed computer tested for codes. The neutral safety/back-up switch has an imput to this control unit, and if doesn't send correct signals on what gear you have selected then you could have idle problems in that gear selection.
Also many times the throttle body & butterfly will have so much CRUD on them that they can't adjust the idle speed properly. THIS cleaning can fix this surge problem as well.
Hope you don't need new electronic throttle body, $1,090.
MERCEDES Benz Master Guild Technician (6 TIMES)
ASE Master Technician
Mercedes Benz Star Technician (2 times)
44 years foreign automotive repair
27 Years M.B. Shop foreman (dealer)
MB technical information Specialist (15 years)
190E 2.3 16V ITS SCCA race car (sold)
1986 190E 2.3 16V 2.5 (sold)