Two things come to mind - ignition problem, fuel problem. I know, it doesn't leave much else
I had a problem with one of the coil wires of the S420 resting on a bolt head. You could see where arcing had taken its toll on the insulation. The car would buck in higher rpms under load.
Could also be a restriction in the fuel system like a clogged filter.
Some recent MBs have a rev limiter when not in gear. I don't think the engine goes into convulsions. It just won't rev beyond a certain point in P or N.
Sixto
95 S420
87 300SDL