>I intuitively want to think that vertically integrating and cutting out several middle men, and selling locally would reduce the price. Especially when I hear so much about distributors gouging farmers. For some reason, this never seems to be the case.

It's not the case because the middlemen exist for a reason, for the reason that it's cheaper to do it that way. Farmers don't have time/resources to slaughter their cows (they don't even have the feedlots that precede that step).

For a farmer to "vertically integrate" would mean to first add a feedlot which would mean purchasing some land, and putting feedlot equipment on it, and hiring (and managing) the people do operate it. That investment "demands" some return/profit, because it has the risk of being a complete failure, and the opportunity cost of what else that money could have been invested in, such as NVIDIA stock.

There are many more steps for that farmer to vertically integrate the rest of the supply-chain all the way to the retail customer, and all of those investments would demand a return/profit also. But you know what else you would need? A layer of management on top of all of it to keep track of everything. Having independent specialists to provide each function at scale actually saves money.

I was once reading a food blog, and the well meaning blogger had travelled to an obscure place and discovered a delicious locally made drink. But he liked the "peasant farmer" producer of the drink, and he didn't want them to get screwed so the blogger was offering up the source of this drink to anybody who would agree to pay double the standard wholesale rate to the farmer and then import it. (this is something like the FairTrade coffee model) But here's the thing: there is a huge time delay between paying the farmer for his product, and receiving the payment from the retail customer who is going drink the drink. If you have the cash to fund this operation (put up your money to buy the product in the third world, and wait to be repaid till the product is sold retail) you are going to have to consider both the time value of money (essentially the opportunity cost, considering you can buy govt bonds at no risk), and also the various risks you face (which the govt bonds don't face): the risk of an accident or theft of the truck that drives the product from the farm to the shipper; the risk of sinking of the ship; the risk etc. of all the next steps, the extra money you'd need to front to the various shippers, warehouses, customs delays, including costs like insurance, retail employee theft, etc. If you factor all those things in, paying the farmer double which means that truckload will cost double is essentially going to mean you will want double the profit at the other end, meaning this product is now twice as expensive compared to its competition. If the product's quality is twice as good, then it can bear that price; but "customers, please pay double so the farmer makes a few pesetas more and the middlemen just make their regular margins" is not a great selling point.

So, how does FairTrade coffee do it? Is the fair trade label just a label like "organic" whose meaning may contexualize to a lot less than you think? I'll leave it to you to decide.