SL/R129: 1996 sl500 stall at 1500rpm
I presume that somehow you are losing spark at increased RPM, or with opening the throttle additional fuel is not added and the mixture is too lean to burn. It's intuitive that a faulty air-mass sensor could cause a lean mixture, but I think your engine can run with no sensor at all, albeit poorly, perhaps.
I would search the "Tech Help" forum of peachparts.com and look for a thread discussing a problem similar to yours. Years ago there were no fewer than four professional Mercedes technicians contributing there on a regular basis: stevebfl, mbdoc, Gilly, and Benzmac.


