I have a 240D that recently had the engine replaced by one with lower miles. The brakes were not working unless I stood on the pedal, and even then, it was sketchy if it would stop in time.
I pulled the master cylinder off the booster can, and it had about 3 inches of motor oil in the bottom of the can. I drained the oil, put the master cylinder back on, and tested it. The car stopped well. I could lock up the two front wheels.
After about 10 miles of driving, the brakes are back like they were, and there is oil in the booster assembly again.
Any thoughts?