https://en.wikipedia.org/wiki/Debtors%27_prison
(Note that the US is often criticized for court fines which result in jail time if you're unable to pay, but that's a much later meaning. Originally it meant jail if you were unable to pay someone back.)
The problem with this is that often it isn't entirely clear if a company really is bankrupt by that definition. A company can be nominally bankrupt in one moment and solvent again in the next depending on how you look at it from a technical / accounting point of view.
This again unfortunately sometimes is preyed upon by both liquidators, investors and creditors, who might try to sue the managing director in order to recoup their losses from the director's personal funds. A conviction for delayed filing of bankruptcy both applies additional pressure and makes a director personally liable, GmbH or not.
So, in short: No there are no debtors' prisons anymore but the effect you described very much still applies thanks to outdated and misguided German bankruptcy laws.