sludged up s500
The engine has variable valve timing that is actuated by engine oil pressure. It may have sludge in the oil passage to the cam actuators. If so, and one is stuck, the engine management system would trigger a Engine Malfunction Light (check engine) and may go into limp in mode. The Dealer should have pulled the diagnostic codes and listed them for you. Lots of things CAN cause the limp in mode. Bad wiring harnesses are common. Sludged up engines are not.
STP sells an excelent engine flush product that works very well to remove oil sludge and varnish. Use it following the directions or even longer clean times--. Use it even 2 or 3 times in a row using fresh oil changes each time.
It will not harm any seals or other parts.