The P0171 is a slightly common error code for the Gen 8 Corolla (98-02). Gen 9 had issues with the intake manifold being plastic and the intake manifold gaskets would go bad. This is less likely on the Gen 8 due to an aluminum intake.
I would look closely at the intake manifold and throttle body area.
Also, ensure your tech used a Denso sensor for the upstream. Toyotas do not like anything other than Denso’s (for reasons like this). Check to make sure it is not a bosch or some one size fits all sensor. I would not think it would be, since this upstream sensor is a special configuration that makes it unique.
Ensure the fuel injectors are the Green colored ones (were they new?)
Ensure there is no air leak between the MAF sensor and the throttle body. Hopefully you still have the stock setup. MAF’s can cause this issue, ensure that there is no leak where it goes in (look at the air filter box for the MAF, it is held on by two screws).
The fuel pressure regulator is located under the fuel rail, and since this is a return less system, I doubt that is the issue. I have never seen one go bad.
The fuel filter is integrated in the fuel pump, so if you have a new fuel pump, you have a new fuel filter.
The 1ZZ-FE engine uses practically no vacuum lines, and there is no EGR. The biggest line is the vacuum line to the brake booster.
I would highly suspect around the intake manifold area. An intake manifold gasket can be replaced rather quickly on this car, you do not have to completely remove the intake manifold, all you need to do is remove the nuts and bolts and pull it back to get enough room to remove and install the new gasket. I would also look at the upstream O2 and ensure they used a gasket. FYI, the best way to get to the upstream O2 is to go through the drivers side wheel well with a long extension (to remove the the nuts).
Good luck
-Karl