Secondary treatment is a general term, and there are many ways to accomplish it. What you're hearing is an average. In fact, depending on how you do it, how well run the plant is, and how you monitor it, you may get higher than 40%. You may get as much as 60%.
Then you can add on what's known as biological phosphorous removal processes. These are common in some sensitive watersheds in Europe, and they could get you up to 90% removal. It wouldn't completely remove it, but 90% removal can be achieved and is being achieved in some plants. It is required in some plants in Europe.