Like I said, we are reached peak phosphorous as we mine it currently, and reaching peak energy as we currently use mostly fossil fuels.
And like I said, I believe we can use new technologies (like, solar power... or underwater phosphorous mining) to fix it.
There's a book that was written back in the early 90s called The Ultimate Resource, by Julian Simon. A fair amount of it is typical libertarian wishful thinking, but he very strongly makes the point that in a free society, there is no such thing as a peak. There are always alternatives, and if a resource becomes more expensive, we will start switching to them. If need be, we will also change our behavior to accommodate these alternatives.
To take a great example, look at gasoline prices. There is no shortage of gasoline in the United States. The price goes up, and suddenly fuel efficiency becomes much more important. As a result, economy cars are much more common, as are hybrids and electric cars. Consumption then goes down.
This would be the case even if gasoline were ten dollars or even twenty dollars a gallon. People would simply take the alternative options, which become more and more attractive as the "default" becomes more expensive.
Phosphorus is the 11th most common element in the earth's crust. Let that sink in for a while. It running out makes about as much sense as the humanity running out of hydrogen. Deposits economically extractable at present market prices will run out within a few decades. This doesn't mean we run out of phosphorus, it just means that the market price will rise until other extraction methods provide enough supply. It will not have to rise far, given just how common the element is.
> Now we are running out of ... energy
We are not running out of energy. Nuclear and solar each provides the capability to run for effectively forever -- fracking provides the short-term supply to build them out.
The idea of resource depletion is completely anachronistic. Today, we can produce or substitute absolutely everything we need, given input of common elements and energy. And we have sources of energy that do not depend on scarce resources. The time when the economy was based on extraction of limited resources has passed.