ABS system 2005 Camry

I have a 2005 camry, the brakes on the front left wheel locked up and began to smoke. I took it to my mechanic and he replaced the hose line and brakes. After the repair it happened again… I was told that it could be the ABS controller had gone bad. I went to the dealership they ran a diagnostic and had it replaced… after the repair… it happened again. Now the dealership is telling me that it is the master cylinder. If this is the case, was the ABS replacement necessary? Should I demand a refund on the ABS system? Any advice is greatly appreciated.