Before going to the expense of master cylinders etc try removing and checking the pedal pivot bolt. As it gets worn it gets a high spot which causes the brake pedal to momentarily lock down. It's probably happened more than you've realised! When the bolt and pivot bush is out give them a good clean and put the bolt back with some loctite and some light grease on the pivot, don't overtighten it. Once you get in the habit of doing this as part of your service routine you won't have the problem again.