no one is incentivized to throw food away,
Recall how much food was thrown away during COVID. Or how the crops were left to rot in the fields during the Dust Bowl (1930s). It costs money to harvest and distribute food so the incentive is to dump it and try again hoping for a better market in the future.
What open source non-profit modern machines are there out there you’re talking about? Because I’d love to buy one.
Who said anything about buying their machines? There is another option.
I don't know which specific country you lived in, and yet I would bet my life savings that the poverty of this country is a result of the (past) colonialism and (present-day) exploitative agreements from Europe/U.S. This colonialism made the ruling class wealthier while extracting value from the land, labor, and resources of developing nations.