http://www.goodbonusguide.com/casino-articles/roulette-systems-destroying-the-martingale-theory-myth.html
Well, if you play long enough, your losses will get arbitrarily close to the house edge.
But if you only play a few times you can end up making a profit.
The guy who only ever makes one bet and doubles his stake has "escaped the house edge", hasn't he?
I assume that the purpose of a bot is to play long enough.
No, anyone using a bot is likely to have played too long. The longer you play, the more likely your luck tends to expected, and the vloser you tend to get to a loss equating to the house edge. That's just rephrasing what dooglus wrote.
It boils down to: the longer you martingale, the more likely your winnngs are to be a range that can be mathematically described as follows:
lost your shirt < earnings < (1 - house edge) * amount you bet