On that car, only 2 real serious problems to be aware of.
First is the A/C evaporators are prone to leakage, which is quite an expensive undertaking, couple grand to fix. Maybe it's already been done, that's how common it is.
The other thing that's fairly common to all engines of this type (104 motor) is oil leakage that may be due to a blown head gasket. On these, it seems like external leakage is the only result, at least it's usually not a scenario where oil is mixing into the coolant or vice-versa.
There are know wiring harness problems on 104 motors also, but I don't recall doing one on an S Class, maybe someone else reading this has had one done, but it' seems usually to be a E-Class problem for some reason.
I don't have much to say about the extended warranty question, just that it's really just an insurance policy, not really like a factory warranty. If it specifically covers the head gasket, the A/C evaporator, and control units, it may be worth it. It's a gamble either way.