A couple of years ago I learned it is possible to create glucose directly from solar power. The estimates from the authors of the paper were that earth could feed 1 trillion ppl this way.
So maybe the Earth could supply 1 trillion people with food if it was turned into a farm planet devoid of any other biodiversity but those required to support human life, assuming those 1 trillion people were living and doing all their non-agricultural industry somewhere else.
If the same could be done for amino acids, starting from feces, and if the electro-biological transducer could be mineaturized people could get it installed in their stomachs & bowels, with an extension cord coming out the exit orifice, like a vacuum cleaner...