Do you mean P0401 (insufficient egr gas flow)? Can you give me more details on the sensor that you replaced.
Items replaced: upper O2 sensor, engine block temp sensor, IAT sensor, egr valve, vsv, vacuum reg. in egr circuit.
I cleaned the throttle body and all vacuum lines going to it. Cleaned steel pipe on egr valve that runs to exh.
If you apply vacuum to the EGR valve does the engine stumble and stall at idle? Use a hand vacuum pump or a good vacuum source on the engine.
This is what I suspected. The passage way in the intake manifold is plugged or restricted with carbon. The 4 cylinder Toyota engines will stall immediately when full egr valve function is applied. This will trigger the P0401 restricted flow code.
This has a MAP system not a MAF system creating a vacuum leak on the egr valve opening will make the rpm race not die or at least until the MAP sensor reaches it limit to increase the fuel injection duration and then it will begin to surge.
My concern would be damage to the converter with the carb cleaner and the chunks of carbon can get stuck on the pistons or valves causing damage. Proceed with caution.
I recommend pulling the throttle body and sticking a rag in under where the pipe bolts onto the intake to catch the chunks. Make sure the egr valve is clean and not plugged on the back of the head.