Justy bj 1991 suddenly dies

hi people hope you can help me… my girlfriend has a subaru justy bj 1991 petroler (believe 1.1 l or so) now has the problem that he sometimes dies while braking (not always but more often) and then only starts after longer start. when I brake the motor turn down and everything people as if I was turning off the engine. if I want to start the engine turns but it doesn’t start. after several try it then goes back history there to: the whole has occurred already years ago but then simply disappeared .. my girlfriend has but 2 weeks ago a full brake must lie down (because of a red ampel 😉 and since then the problem is back again 🙁 ‘DANKE THANK YOU THANK YOU that can help me (mechanic is also at a loss)