I do not definitely think that urban farms AND urbs at a whole can be sustainable, IMVHO the sole sustainable model in the present time is the Riviera ones, where people work and live in low density areas with a small distributed economy that can evolve instead of creating mega-structures and mega-infrastructures that serve a purpose for a certain period of time, perhaps well, but can't evolve and so cyclically became equally giant issues but my point is totally different and it's that actual farming is effective in economical terms at today social organization notnature. In the actual mass distribution of foods model a classic tiny "elderly" farm is unsustainable economically, but that's not by nature.

Actual way we live is evidently untenable, but actual way of living does not means the sole possible, the sole civilized etc. In practical terms my own personal classic veg-garden is far to satisfy my needs, but having it is nice, do not impede me from being a connected sysadmin, do not even demand much time: irrigation is automated, I only need a bit of manual hours at start and end of the season, little time for harvesting even less to surveil. Of course, I do not achieve self-sufficiency, I just made few month worth of fresh tomatoes and salad to make salads at home, a bit of potatoes and beans+peas again just to be used few months, the former fresh (boiled, fried, oven-ed) and the rest normally frozen, some aromatic plants (sage, rosemary, thyme etc) and sparse red fruits. To harvest enough to be self-sufficient I need more land than a small slice of terrain in the back of my home, I need animals for manure (so far I get it for free from some neighbors who have horses, so that's anyway self-sufficient) etc. Not an easy business and not my own business, but in my region there are still few small farms that sell their product in not so small quantity, not enough for self-sufficiency of the territory but still a significant surplus. For poultry it's not much different, it's untested for me but I think producing some crops+insects to nourish them can be done at a very small scale in space, energy and labor terms, the keeping them do not demand much work: a weekly clean up of the henhouse with a pressure washer in 10', a bit of regular fresh water supply, regular harvesting of eggs, perhaps once an year a bit of work to incubate some eggs and when it's about time to slaughter some chickens, a thing that does not demand much again 1/2h for some, a knife, a simple kind-of-open-washing-machine with hot water and few rubber teethes to quickly remove plumage (a very simple and cheap stuff, energy produced by p.v. also), a bit of butcher works to empty them, a bit of time to make the blood drain, some final touch and they can go to the freezer. When needed a simple scale, plunging them in water + right dose of salt (14/15g per kg) for a night, an oven or a smoker and they are ready to eat. Again not self-sufficiency but still enough to not needing buy eggs and a bit of extra meat per year. Just that at a certain scale lower significantly the need of third party food.

Since the target should be local/regional self-sufficiency, talking about my latitudes, trout farms can be planted in so many places here, enough cereals and fruits are already produced in the plains in the center of the country (France), seas offer a bit of foods etc. Not really a distributed self-sufficiency at the actual overall population but almost there, if well done on scale. In the end in the entire world that was what our ancestors have done for millennia and since we are here is have evidently worked well enough...

Surely modern tech help, especially in a climate change scenario to ensure ability of amassing foods for long time, surpassing locale climate events etc I do not think about classic hoe and pitchfork by bare hands, of course, but that's is. The issue is far more the actual economical model than nature or technical.

Just a BIG load of things we need today is needed only because people mostly have forget how to preserve foods at home. Just knowing how to salt the meat (produce sausages and dried meat products at home) and making preserves in jars + using freezers ENORMOUSLY lower a big set of actual food needs. That's is personally tested, when I was living in a big city I usually buy food constantly and that means crapload of packaging AND relevant processing/supply chain behind, now I buy food once a month in quantity having space to stock, I have better quality food and far less industrial/supply chain work needs behind. Just frozen bread and some kind of cheese who can be frozen issueless was game changing with essentially no effort. On scale that means pushing riviera model, with individual homes and enough space, WFH for eligible jobs etc cut perhaps 1/5 of our actual food supply chain needs, not enormous but very significant to start a new economy.