You have to deal with it as soon as you can not meet a obligation. ("Zahlungunfähigkeit") If you give your own company a loan, then you can meet your obligation and you're fine on this side.
You also have to keep an eye on your debt level but that's more complicated, especially for owner-loans.
> I know some people start companies with a bit of money for this reason, or even use something physical (i. e. their notebook) as an initial deposit into the company.
Funding with physical good ("Sacheinlage") is however only allowed with a proper GmbH. This rule makes it sometimes a little bit interesting to convert an existing, fully liable, business into a limited liability corporation if if all the goods and money don't add up to 25,000 Euro.