This is already kind of a thing if you do it manually. Some areas produce very cheap food for around ~8 gold, so I always load up on a couple hundred whenever I see it at this price because you can sell it to starving cities for a high profit and help stop the bleeding after village raids hurt the food supply. My favorite is Olives from around Jaculan because they seem to have the highest margins, but fish and grain are just as good for stopping starvation.
Would be really nice if you could assign a caravan to it, though. IE, order the caravan to buy food below average market price and sell it to your own towns. AI caravans will trade food from nearby low-price regions to cities with good shortages that offer a big profit though.
The real key to keeping a city at high prosperity seems to be the nearby villages, though. All villages produce some amount of grain as a secondary product specifically for selling in town, but food-producing villages are still obviously best. They'll also give the flat +5/10/15/etc bonuses based on hearth size, so it's best to pick a town to own that has as many bound villages as possible. Some only have 2 and they struggle. Marunath and Jaculan are two of the best in my opinion because they have four and some of those villages produce food as a primary product, so they rarely starve.
The other key is to use the Irrigation daily task instead of Housing. Housing adds prosperity and can cause the town to outgrow the villages' capacity to feed it, while using Irrigation along with a production boost and a skilled engineering governor can grow villages by 2-3 hearths per day, which can make a huge impact, especially if the governor also has one of the +20% village growth perks from Athletics or Medicine (good luck training those up on an Engineer though, lol)