This is one of the reasons why the brilliant and unconventional economics professor Steve Keen recommends a debt jubilee for all citizens:
https://www.youtube.com/watch?v=TBbXwQTvl_g
It circumvents the moral hazard you mention while alleviating the problems that are impacting all of us.