A debt is a contractual obligation and should be treated as such. One should not moralize contractual obligations.
E.g. During the housing crisis, there was a lot of moralizing about homeowners walking away from their underwater mortgages. Moralizing about debt in that way is bullshit. When lenders make a loan secured by collateral, they take the risk of the value of that collateral dropping. There is absolutely nothing immoral about forcing a lender to eat a risk it knowingly on.
Similarly, a corporation would not hesitate for a second, on moral grounds, to restructure its debts through bankruptcy, and neither should individuals. No moralizing needs to enter the equation. There is a penalty for declaring bankruptcy and failing to pay your debts, and that is future lenders being wary of lending you money. There is no need to add a moral dimension to the issue.