I know you said you took readings on the MAF and swapped it with a non motorcraft one, but I have a quick story anyway.
Years ago I had a 99 super duty with a 5.4. I was driving along and all of a sudden the truck became gutless, would never stall, but I would put my foot right to the floor and it just wouldn't go. The check engine light flashed while this happened and then it would just clear up and the truck would be happy again. It wasn't long and it would happen all the time. It was so frustrating not having any guts to keep up with traffic and I would throw it in neutral and roar that truck thinking maybe I'd clear out some restrictions but nope.
Went to the parts store and had them scan it for me. Came back as whatever the code is for possible MAF issue. Asked the kid at the parts counter to look it up for me, 100 bucks. He goes dude, save yourself some money and clean it with this stuff (CRC MAF spray). Gave it a shot and it didn't really do anything. Brought it to a local garage and they said 'your shift sensor is toast, we can swap it out right now, 250'. So I went with it. Left with the truck and it was okay for a couple days, then the issue came back. Went BACK to the garage they scratch their head and say leave it overnight. Call me up a few days later and say 'what have you been doing to this thing, the catalytic converter is all stuffed up no wonder it's got no guts!! Temp readings through the roof before the cat!' $700 for cat and new exhaust behind it.
2 miles down the road, you guessed it. I start thinking and go back to square one and ask the garage 'you think it could be my MAF after all?' He says No way, not a chance, we checked the readings it was within spec blah blah blah(kind of like my story). So I said okay, if you're so sure then let's make a deal. You replace the MAF with a motorcraft. If that solves the problem, you pay for it, for bending me over on all these un-needed repairs. If it doesn't work, I pay for it. He said deal and guess who only had to pay 950 for a 100 dollar repair? Anyway the moral of my story is, your symptoms sound a lot like the MAF problem I had. Is it possible it really is faulty, and the car just doesn't like the aftermarket MAF you replaced it with? Could you try out a Motorcraft one and return it if it doesn't fix the problem?