Subaru 1999 Legacy piston misfire codes 301 - 304

I get check engine codes p0301 p0302 p0303 and p0304. Sometimes just one or two sometimes all four. It only happens in fifth gear at or above 2800 rpm. There is no noticeable misfire; my gas mileage is 25mpg and like the advice below, I’ve changed the wires, and spark plugs but not the coils nor the injectors. I’ve reset the codes numerous times; it comes back regularly but only in fifth gear at the higher speeds.

The car: Subaru legacy AWD wagon 1999, 2.5 liter 5 speed manual transmission.

To state the obvious, checking for electrical problems is a process of elimination. I’ve included some points I got elsewhere online to narrow down the cause. What is not discussed, but has been brought up by parts salesman are the sensors. There’s five, a cam and a crank sensor as well as three speed sensors. I think someone out there might know which sensor that’s failing would cause such specific engine codes.

Talking points:

“for piston misfires If there are no symptoms, the simplest thing to do is to reset the code and see if it comes back.”
Check engine light comes back on

“If there are symptoms such as the engine is stumbling or hesitating, check all wiring and connectors that lead to the cylinders (i.e. spark plugs).”
There are no noticeable symptoms.

“Depending on how long the ignition components have been in the car, it may be a good idea to replace them as part of your regular maintenance schedule. I would suggest spark plugs, spark plug wires, distributor cap, and rotor (if applicable).”

“Otherwise, check the coils (a.k.a. coil packs). In some cases, the catalytic converter has gone bad. If you smell rotten eggs in the exhaust, your cat converter needs to be replaced.”
It passed smog with flying colors. I’m not sure how to check the coil packs but since it doesn’t actually seem to miss, I’d think to look elsewhere. – maybe I’m wrong here.

“I’ve also heard in other cases the problems were faulty fuel injectors.”
Same conclusion as above.

I think some folks have had some success fixing this kind of trouble by replacing the CAM sensor. I very much doubt the coils are causing the trouble. The trouble can be somewhat hard to pinpoint at times.