The engine stalled because when you applied the brakes the brake light switch applied 12V to the trans converter clutch and locked it up, much like stopping a manual transmission vehicle without stepping on the clutch. It takes 12V applied to the converter wire to lock the clutch. Originally that function was controlled by the ECM and I suspect you aren't using one and if you are it would need to be one that had that function built in.
Normal opeation of the converter clutch occurred at vehicle speeds at or above 40 mph and would automatically disengage with the brake were applied or when coasting somewhere around 4 to 5 mph. Throttle position was also a controlling factor.
If it were mine and I wanted the converter lock up function to work, I'd wire in an on/off switch and control the thing manually.