My take is slightly different, and I believe the best answer
Owning an older Mercedes is an emotional decision. Emotional decisions fly counter to rationality. I had the absolute most pristine 97 C230, with AMG upgrades, eye appeal, a ton of previous starmark work done to it, but this spring I realized the car was in the best condition it ever would be in. The fuel vapor chamber and lines were leaking, a horn was out during inspection, and I was replacing ball joints, etc, for the 2nd time under my ownership. At 170k, when is the trans going to die? I sold the car for $6000. The trans could have eaten $5k of that easily. Do I love this 11 year old, 4 cyl car that much? I love it, but it was time to let it go. I bought another Mercedes, but it is under warranty - an 06 C350. So, there's my take:
Sell when it when repairs are inevitable that could eat the value of the car itself (I think Clark Howard actually recommends selling when repairs could exceed a mere 50%). If you sell it, I would certainly not buy another out-of warranty Benz, or you might as well have kept the old one. Buy something under warranty. There are 02-05s out there, Es and Cs, CPO cars, cheap. Negotiate an extra calendar year or 2 on the coverage, and go with it.