My 2003 Mercedes has acted like it's going to stall at stop lights occasionally for the last few months-shudders at stop signs, then recovers. Today I rev'd it in neutral out of fear it would stall. Immediately following, for the first time, it shuddered...then stopped shuddering, but then it wouldn't accelerate for a few seconds. Just sat there. It then accelerated. Also there was an odd burning smell briefly (that has come up in the past). The smell almost smelled electrical, but unsure. Husband thought it bad gas that's caused the shuttering, but we've used premium or unleaded with occasional STP fuel engine cleaner. Also 25 percent ethanol regularly in the past. (Car ran great for 10 years)
Have you ever cleaned the throttle body (or had it cleaned)? First thing, check if your vehicle requires any throttle position relearning procedure after throttle body cleaning and, if so, learn that procedure. Then, identify the gaskets that mate the throttle body to the intake manifold and to the pipe coming from the airbox and buy them, buy a throttle cleaner (carb cleaner isn't good for that, it has to be throttle cleaner and nothing else), remove the throttle body from the car and clean it, being careful not to scratch the plate in any way, then replace the gaskets and reinstall the TB and do the relearning procedure if required. Or have all of this done by someone competent, if you don't feel like doing it.
Reduced airflow around the plate at idle position, due to an excessive carbon soiling of the throttle plate edges, causes what you experience. The smell might be a completely different issue.
Another possibility might be a dirty or faulty MAF.