Before people could pull nitrogen out of the atmosphere, wars were fought over guano deposits, etc.
At this point, the majority of nitrogen in human biomass comes from the Haber-Bosch process.
(I’m not arguing against composting, to be clear!)
In medieval times most of the population were farmers by necessity. In the UK, output per acre tripled and the proportion of the population in farming went from 60% to 20% in 1840. And the UK was still almost entirely self sufficient at this time, food imports only became substantial in the late 1800s.
Similar changes happened across Europe, though timing varied by country with the spread of industrialisation.
https://en.m.wikipedia.org/wiki/British_Agricultural_Revolut...
Again, not commenting on the merits of this technology, I just think it's not correct to say that composting can't scale.
The Germans pioneered modern fertilizer production in the 1890s-1910s.