Student loan forgiveness in bankruptcy is hardly
free. There would be a huge advantage to having paid back the loan.
Which is why I think forgiveness should be an option ~7 years after leaving school. You still have to convince a bankruptcy judge that you can’t pay but wrecking your finances at 30+ would discourage most from going down that path.