Really wish I had more time to be scientific with this and do changes one at a time and see how it goes. Unfortunately my tags expire on Thursday so I have to get it to pass emissions before then. I am just going to do a bunch of stuff and hope it helps.
This morning before it started raining I drilled out the mixture screw on the AFM and adjusted that down 1.5 turns. Factory was 3 turns out. I hooked up the FPR directly to manifold vacuum, as it was apparently never hooked up correctly. (It went to a vsv and from there to the charcoal canister...wrong!) I also have the hose from the bottom of the EGR modulator going to the EGR pipe nipple that is just before the valve, like it is supposed to. It strikes me now that that was a massive vacuum leak as it was just wide open before.
Immediate driving impressions are that the idle is smoother and more steady after warm up. More importantly, I seem to have found a bunch a low end power. I can get the truck moving easily in first gear with ZERO gas pedal, and in second gear at 1k rpm the truck accelerates smoothly whereas before it was really lugging and not happy.
Unfortunately I have no way to know what of the above changes did this.
After I hooked up the EGR modulator correctly I did the vacuum test and it still did not work. With the engine off I can hear the valve moving as I apply vacuum so I think at least that part of it is working correctly. IDK what to do on this front. It strikes me that when this opens up at idle you are basically making a huge vacuum leak which would be the cause of stumbling or stalling, and that is definitely not happening at all.
My plan right now is to get the vac hoses swapped out once this rain stops, get the timing down to 0, and open up the AFM gear and move it one click rich. I will then drive out this tank of gas, put 91 in it and give it another run through the sniffer. If it fails after that I will pull the EGR valve and give see if it isn't clogged up, and make a baffle like emsvitil mentioned.
I am having a hard time believing a malfunctioning EGR is causing the crazy spike I was seeing in NOx. Sure, EGR will reduce Nox but that much? I have known CO trucks to get through emissions with EGR disabled so I don't think that is my main issue. Sure, EGR could get me through but that may just be a bandaid.