40 psi at idle is pretty good. The EGR solenoid doesn't affect anything as far as how it runs, especially at idle. Many people remove it or the valve and remove the check engine light.
When you installed the new IAC, did you adjust the pintle down to just under 1 1/8 inch? If it had a slotted pintle shaft, did you rock it side to side while pressing down on it to retract it? If it had a smooth round shaft, did you retract the spring from the tip and screw it down? The one with the slotted shaft can be damaged if you try to screw it down.
O-2 sensor usually will throw a 33 code if it's bad. I'm having that issue right now. 33 code and 45 code. Rich exhaust and MAP sensor. 0-2 sensors can be bad enough to give problems but still not throw a code.