For rare events is made a reset to the initial bet. Doubling does not go on forever, the loss after the last unsuccessful bet is overlaps by subsequent successful ones which will go after the reset. There is a certain balance in the system of doubling bets, at some moment it ceases to work in plus and begins to increase the loss in progression.
Youre not the first one to come up with a variation of martingale that you think beats the house. But even if you had unlimited funds you still can't do it. You will always lose because of house edge and max bet size. You should create a simulation and test your strategy on millions of random crashes.