As others have said, the way to avoid going broke in poker is to use some form of bankroll management. However that being said a recreational online player does not need 100 x the buyin to play micro stakes cash games. That level of buffer is for professional players, who depend on poker for their living.
For the rest of us moving down is an option, if we hit a downswing, so its more a question of having the discipline to actually do that, and certainly not move up to "win it back". And should we lose the last at 2NL, well then redeposit is also an option. Its not like, its the end of the world, if we talk about popping for instance 50$ into the account.
I would recommend 30x the buyin as a reasonable bankroll management rule in the micros, which give the following guideline for, which limit to play using the 888 poker limits as an example:
<150$ - 2NL
150-300$ - 5NL
300-600$ - 10NL
600-900$ - 20NL
900-1.500$ - 30NL
1.500-3.000$ - 50NL
Note that while the minimum is 30BI, a lot of the time we are actually playing with way more, so this is already fairly conservative. If you dont mind some larger swings, its also reasonable to use a "shot taking" system, where anything above 30BI for your current limit can be used for "shots" at the next.
If for instance you have 80$, that is 30BI for 2NL + 4BI for a "shot" at 5NL. And this is fine, as long as you respect the system and move back to 2NL, if the "shot" fail. If you can not survive at 2NL with 60$, then chances are, you are not even a winning player, and then no amount of bankroll management will protect you from eventually having to reload.