Have you run some 91 or 93 octane in the engine to confirm it is pinging you are hearing?
Timing chain issues on the 4.0l SOHC can sound similar and won't have codes.
4.0l SOHC also has a Knock(ping) sensor, these can fail without giving a code
It is located under the upper intake and is a PITA to get to, it has a 2 wire connector on the passenger side of the engine.
Don't know of any test for these, they cost about $40 but alot of labor to remove and replace.
EGR is an emissions system so any slight problem will always cause a code.
If it wasn't working correctly it could cause pinging, for sure.
You could unplug the 3 parts of the EGR system, one at a time, and see if you get a code, if each causes a code then system is OK and problem with pinging is something else.
3 parts are:
EGR Valve, unplug vacuum hose and plug the hose
EGR modulator, follow the EGR valve hose to the Modulator, unplug the other vacuum hose and plug it.
DPFE sensor, unplug its wire connector, also give the hoses a good look these can get brittle and crack.