From doing a bit of digging into this myself after hearing it being promoted on the radio, I both agree and disagree. Working through the $/acre for on-site produced ammonia using locally-generated electricity (I forget if I was looking at PV or Wind, doesn’t matter) the payback period was surprisingly quick, like 2 or 3 years. One of the big reasons is that you don’t actually need a very big system; you only need on-farm ammonia a few days a year but you have all year long to harvest and store enough for those few days.
Then you have 1,000 separate ammonia generation systems that need upkeep, repairs, etc. It is doing chemical reactions under pressure to produce presumably ammonium nitrate which is explosive. The engineers you would need probably aren’t cheap, and storing large quantities of ammonium nitrate all year is sort of sketchy. Timothy McVeigh took out an entire federal building with about 4800 pounds of the stuff mixed with car fuel.
It’s usually a lot cheaper and safer to condense all that demand into a purpose-built facility where they can hire an engineer to look after all the generation, have centralized container storage, backup parts, etc.
None of that prevents putting the panels or windmills on farmer land, though. You could imagine some sort of “get a discount on ammonia if we can put a solar panel in your field” scheme. Or, even more simply, put up your own panels, sell the power back to the grid, use that money to buy fertilizer from the factory buying your power off the grid.