The observation I made about farming that always made it difficult (financially) was that all the wealth was tied up in things. Your acres, your livestock/crops, your home(s) and other property. High value equipment as well (tractors aren't cheap, neither are their accessories).
The issue was always turning these things into cash. So mortgages were one way (though if I'm being honest any one who has run a large scale farming operation probably doesn't lean on the mortgage. You can get agribusiness loans with much better terms and crop/livestock insurance[1]).
Contrary to popular belief though, the land that is actually farmed is mostly leased/rented, but its typically a long term deal, so you don't have to borrow millions of dollars just to increase acreage [2]
This was something that large corporations don't have such trouble with (not to mention, most large agriculture companies have a portfolio of assets that they make money from, not just their production). I also noted that those in good co-operatives didn't have as much of an issue with this either (co-ops are good market makers and can help small farmers with buying power if they need to change crops quickly in response to market demand.
See all the bankruptcies and delinquencies hitting wheat farmers right now [3] some of which is in part to the trade issues we're having with China. They're a huge net importer of certain cash crops. Most of these guys were all in on their cash crop, without a good way to get ahead of market demand to re-calibrate their crops. Livestock is much harder in this sense, but its still doable)
This is the common reason why older farmers tend to sell (beyond simply crushing debt. It does happen for a lot of reasons. I'm not trying to under sell this. its just hard to write up a lengthy post here without it becoming an article). So they can actually cash out
[0]https://www.ufcmn.com/About-Us [1]https://www.farmermac.com/ [2]https://www.ers.usda.gov/topics/farm-economy/land-use-land-v... [3]https://www.wsj.com/articles/this-one-here-is-gonna-kick-my-...
EDIT: if the people of HN will it, I could do a long write about about Agriculture economics. I've got a strong background here.