I thought they quit making the 4.0 SOHC in 2010 or maybe as late as 2011. There's likely rebuilt/re-manufactured engines available after that though.
Anyway, the engines are generally the same from 2006-2010 with some exceptions such as different intakes between Mustangs and Explorer/Mountaineer models and jackshafts used in some Explorer/Mountaineers especially 4X4s.
This is my experience anyway. I took a 4.0 out of a Mustang and put it in my Explorer and just changed the intake.
I'd be more inclined to look for missing or damaged connectors or wiring harness for the problems you mentioned. The harnesses are notorious for having melted wires. Or maybe they dealer didn't hook up evap system or 02 sensors since they are the 2 sensors that I can think of that are not connected to the engine itself.
A good resource is the wiring diagrams/component locations is
Repair and Diagnosis — 2006 Ford Truck Explorer 2WD V6-4.0L VIN E Service Manual | Operation CHARM
Especially:
It's likely something simple.
Good luck
Steve