Phosphorus and potassium are still problems. The primary sources for both are mines deep in the ground. We can't pull those out of the air. It looks like phosphorus is going to be a problem earlier,[0] so there are pilot programs to reclaim it from sewage. Those are going to have to scale up quickly. Eventually, potassium will also be a problem.
Technology might solve the problem, but it is not a given. It will take investment and work.
[0]https://www.americanscientist.org/issues/pub/does-peak-phosp...