There are many ways to explain the "no farm districts build" scenario:
The farms you see on your planet, that produce to the Empires stockpile simple are not all framing activity on a planet. The Tiles just represent the largest areas were the soil is good enough to do this very large farming districts efficiently. There are many smaller (invisible) farms out there that you could buy from.
This is actually again the realism/abstraction debate. A game (any game i played) dose not aim to model the realty as close as possible. Just to be fun to play.
I rely don't think a proper dynamic market (as in Vicy2) would work out well (as in Vicy2).
I totally understand that the market may brake your/our immersion from time to time. I just think that a dynamic market would brake the game in so many more ways, and would open up so many more exploits (which is what OP may have discovered) that it would not pay off at the very end.
I don't buy this in the slightest... The districts are suppose to represent the main type of infrastructure you have on planets on a planetary scale, you then have POP that work in them an produce a set or abstract resources.
I get that you probably have some people in each job type that do other stuff and some miners have gardens and will grow their own food or some farms even in your mining districts. But nothing that effect on the grand scale of billions of people.
We don't tax people in Stellaris, we basically act as the controller of the actual resources produced and infrastructure built. The internal market as dreamed up by Paradox is just a mechanic and really represent nothing in the background that make any realistic sense. You then have trade that just is a resource that generate energy out of nothing... it does not consume anything and are not really connected to POP other than POP give it to you for free.
Don't get me wrong... I like the new economy system overall... but it make very little realistic sense in any way.