I used to have the p401 forever & ever too... Replaced the EGR once. Fixed for a few months, then CEL came back with that code again. Lived with it for another 100k miles. Finally after replacing the intake gaskets and cleaning the heck out of the IAC, throttle body, etc. The code went away. Gone for around 25k miles now.
I had replaced the intake gaskets once before for an idle related issue, but I think that when I did it, I accidentally dinged one of the gasket surfaces while re-installing the intake. (Careful with the back right corner when re-installing...) The 2nd time I did it around 50k mile after the first time, I caught myself and realized what I had probalby done to compromise the job the first time. Since doing it the 2nd time. All has been well.