Insufficient EGR flow in a fifth generation is a symptom of intake manifold EGR runner clogging, a common problem on these models. The fourth gens and Accords have more access and a different design in the mainfold, so they don't have this problem. Unfortunately, the fix is a bit difficult to do correctly. According to Honda's Service Bulletin 98-074, you want to drill out the EGR ports on the manifold (those metal plugs on top of the manifold), tap them, and pull them out with a slide hammer. Then you clean out the ports with a coat hanger (per Honda's instructions!) and tap in new plugs. The plugs are cheap: part number P/N 17199-PT3-AHM, H/C 6078596. The entire kit from Honda, however is usually a hair under $300 (
) it is P/N 07WAZ-001000A and includes 30 plugs, the slide hammer, etc.
As for the original poster's question, the O2 sensor is not really related at all to EGR, in fact taking the EGR off will make your car run better, but not cleaner (do not do this, eco-villians!). O2 sensor failure codes, whether for an O2 heater circuit or a regular circuit generally indicate a failure of the sensor itself. You can get a Honda sensor, or a good aftermarket (like Bosch) and see if that does the trick. One thing to make sure of is that the sensor is actually there: some shady aftermarket headers either don't have a sensor port, or it is in the wrong place, and the exhaust shop leaves it off. Also, if they try to extend the wire for the sensor further back to reach, they can mess up the 5v reference voltage going to the sensor; I've seen both these problems before. They can also mix up the (green and white?) wires that go to the sensor plug, on many Hondas these two wires are reversed in color when wired correctly from the factory, for some reason.
Lastly, the car will not pass emissions. On OBDII cars such as your, there is no "sniffer" that goes in the tailpipe, the tech just plugs in there computer to the car's computer, and it makes sure that the CEL is turned off, in other words, the car tells the machine it is emissions compliant. Even if you don't have to pass emissions in your state, you should fix it, as it will be happy for the environment, and your car is only only running in open loop, which will affect non-WOT drivability. I hope this helps. Good luck!