I don't think you bought a lemon.
The hardest thing to diagnose is a randomly occurring problem, which you've got.
I really feel sorry for you. But, in a way, I'm sitting here thinking that I'm not the only one that these kind of things happen to. I had the famous check engine light that kept on illuminating, and after throwing about $4,000 in parts and labor at it over a 6 month period at two MB indpendents and the dealer, it turns out it was just a blocked egr tube, just like Stevebfl posted. If only I lived near Steve's shop, I'd be his best customer for life...
2001 E430, Bourdeaux Red, Oyster interior.
1973 280SE 4.5, 170,000 miles. 568 Signal Red, Black MB Tex. "The Red Baron".