Yes, hot exhaust and popping noises from CAT means rich exhaust
Does it run OK at speed?
If not then yes could be clogged Cats or exhaust blockage
Pull a couple of spark plugs and see if they have blackish tips, sign of Rich fuel mix.
You should get a Volt meter and test the MAF sensor voltage while engine is running, sensors rarely fail, not never just rarely, most problems are with the wiring, dirty or corroded connectors.
So YES, don't throw money at it.
The computer knows it is running a 4.0 Liter engine, so it knows how much air the engine should be sucking in at 700RPM, or at 2,000RPM, the MAF sensor is there to fine tune the exact amount of air for best MPG and performance.
So if the computer sets a MAF code it means the RPM air that should be coming in doesn't match what the MAF sensor is showing.
Could be MAF sensor is dirty or the voltage coming from MAF sensor is low(or high), MAF sensor voltage is 0 to 5 volts, so even a little corrosion on a wire connection makes a big difference.
When you opened the EGR valve at idle engine will stall, if it didn't then you have a problem.
EGR is only used when engine is fully warmed up and only when accelerating or cruising at highway speeds, purpose of EGR system is to Cool down the cylinders to lower NOx emissions.
So if opening the EGR at idle made idle smoother then you have restricted air flow into the engine, opening EGR valve lets in more "air".
Pull a vacuum hose off the vacuum manifold, upper intake drivers side toward the back, see if engine idles better with a vacuum leak, confirming restricted air flow.
Remove air filter cover and air filter, see if engine runs better, could be the Cold Air Intake tube is plugged.
On the upper intake near the front is the IAC(idle air control) valve, looks like a can mounted sideways.
IAC Valve lets in air so computer can set idle RPMs, it is, in essence, a controlled vacuum leak.
It has a two wire connector, start cold engine idle should be above 1,100rpm if not then IAC Valve is not opening, so not enough air is getting into the engine.
Remove IAC Valve, 2 bolts, plug in its connector, turn key on, IAC valve should move fully opened, unplug connector and it should move closed, repeat a few times.
If IAC Valve is not moving at all you should replace it, these don't fail often so wrecking yard replacements are not a big risk.
The 2 wires should show 12volts, key on, but it is Pulsed Voltage, so can look odd depending on the meter being used.