This is basically martingale, which there is a lot of research on. Basically in bets that have positive expected value such as inflation hedged assets this works better over the long term, than bets that have negative expected value such as table games at casinos.
But remember, whatever your analysis is:
The market can stay irrational longer than you can stay solvent.
Things that can disrupt your solvency are things such as options expiration, limitations of a company's ability to stay afloat, limitations in a company's ability to stay listed on an exchange, limitations on your borrowings and interest payments, a finite amount of capital you can ever acquire (which means there is a limited amount of times you can double down).
Best to get out of the losers and free up capital for the winners. If your "trade" turned into an "investment", ditch it. Don't get married to positions.