You could try adding some kind of correction for bet 4 using 'total_won' or 'last_pl' (maybe 'stake - last_pl - last_won' > 0) depending on your setup - maybe having a trigger run every so often to compare 'total_won' with a starting bank constant.
If the markets are 'finished' but unsettled then you could probably set up something to anticipate the settlement (combining market_min_pl with selections price under X to presume the loss) and correct the next bet accordingly.
If the markets are overlapping in running then it may be worth trying pre-emptive loss recovery, where you'd make the next bet based on the price of the previous one. For example, if the 2nd bet hadn't settled and has £10 liability at odds of 2.0, you'd get the 3rd bet to act as if there was a £5 loss, or an £8 loss backing at odds of 5.0, a £2 loss if laying at 5.0, etc (i.e. liability*probability of losing = loss recovery amount for bet 3).