How do you diagnose a brake failure issue in a 2006 325i BMW?

I was told by the dealer to determine why the brakes failed in my 2006 325i BMW with 24,700 mi, conduct:

  1. brake flush (~$200)
  2. take off and inspect master cylinder for leaks (~$900)
  3. if leaks found, replace master cylinder and brake booster ($3500). I was told its nearly impossible to determine if the brake booster is contaminated with brake fluid

Question:
Would this work alone determine why the brakes failed?

And would this work determine if there was an interruption in the oil supply for the vacuum pump that operates the brake booster that is used for power assist ?
There has been a recall on this problem in other BMW models and in this model for 2012-2014 years.
I read in a complaint report on the NHTSA that the persons mechanic advised them that this is a common and dangerous problem