Yes, the rise of corporate agriculture and the demise of the family farm are surely factors. Rural populations have crashed in some areas in recent decades, especially in corn country like Iowa where I spent my high school years. Farms of several hundred acres, and even of a couple thousand acres, have been bought up by monoculture conglomerates that invest in high tech equipment to grow more crops on less land with far fewer workers.
We used to think the population was thin when Iowa farmhouses were widely scattered. Now, those farmhouses are starting to fall apart because families don't live in them anymore.
Crews paid minimum wage or close to it show up in fleets of enormous John Deeres every few weeks to tend to fields, then move on down the road. It's a brave new world.
Young people are leaving because opportunity has already fled.