By being run well and not spending much.
Gillingham have slowly come back from the brink as they were 13m in debt. What helped them was selling their stadium for 10m and later buying it back for 1m. Plus several cash windfalls from selling players.
Walsall reduced their debt to 2.3 million...