2002 subaru forester with 145 K miles

what might be causing 'stumbling/hiccuping when easing up on gas and more recently revving up and down when stopped? New plugs and wires recently done - didn’t help

It is very possible that the person who installed the new plugs and wires accidentally disconnected a vacuum line. What you described is the classic symptom of a disconnected vacuum line.

occasional “stumbling” when letting up on the gas, has been going on for more than a year. would it have anything to do with the headgasket or air flow sensor? Thanks

It definitely could be related to a bad Mass Air Flow Sensor (MAF).

Do you by any chance have one of those K & N “performance” air filters to which you apply oil? I ask because over-oiling those filters is an excellent way to ruin the MAF.

As to a headgasket problem–Is the car “using” coolant? Does the motor oil look milky?

NO to K&N filter - very tiny leak seen on headgasket

You might want to see if there are any codes stored in your car's computer.  You may have a stored code even if you have noticed any lights.  Some auto part stores will read them for free.  They should be in the format [P0123] post any results back to this thread.

Please provide more specific information regarding the “tiny leak seen on headgasket.” I see you mentioned this on another post about a Forester. Are you saying there is a visible coolant leak at the head gasket?