4.0 is a way better engine. It fixes all the problems a 2.9 has, gives you a serpentine belt, and adds a ton of torque. It's a truck engine--never installed in anything but a truck. There was no horsepower war going on when Ford developed it. It was built to pull a load, not boost a glossy brochure. When they went to the SOHC version, that was for the advertising people. The pushrod motor is capable of anything you can ask.
I owned a 4.0 Ranger, then bought a 2.9 B2 and just couldn't stand it. The 4.0 allows a lot more clutch than the 2.9 for hauling the truck over rocks or even shrugging a trailer into motion--which I did a lot with a camper. There isn't a comparison in that type of work.
Running a quarter-mile, I don't think there is a big difference between a 2.9 and a pushrod 4.0. The 2.9 pulls longer in each gear. But as I said, Ford built these as truck engines. A lot of people now want to see their vehicle as FAST when Ford built it as a TRUCK. It's the best compact TRUCK engine ever built. It's crap as a race motor.