You can do solar -> hydrolysis -> hydrogen -> ammonia-> fertilizer, rather than methane -> steam reforming -> hydrogen -> ammonia -> fertilizer.
So it's technically feasible. Not quite there in terms of cost and scale but if the alternative is a blockade then probably worth investing in.
Ironically some of the best locations for production are in the middle east.