So I looked at building a 347 for awhile until I learned that it’s not good for daily driver use unless you really like building engines. Problem is the stroke is so long that the bottom of the pistons leave the bottom of the bore so they tend to wear an oval into the block. 331 Stroker is a little milder but infinitely more street-able. That would be my go to. If I felt it needed, boost would be involved rather than a 347. Having driven a couple 5.0 swap Rangers, I feel fairly confident in the idea that a turbo or supercharged 331 would do anything I wanted it to on the street.
I did a straight over swap for my dad years ago, just dumped the Explorer engine, trans, and AWD case straight into a Ranger. Only fancy thing was to do stainless 2.5” true duals from the cats back through a stainless crossover muffler. Unfortunately I was driving it one day and someone ran a red light and clobbered me so it got totaled. I just recently finished the major part of a build on my own Ranger last September. Still got a few things to work out on mine, but it’s drivable. Lowered, 5.0 Explorer engine/trans/AWD case, Explorer rear axle with extra clutches in the limited slip and a diff cover that braces the main caps, did the Torque Monster headers, high flow cats with stainless 2.5” duals all the way back through a stainless crossover muffler. Need to change my rim and tire sizes, shift kit for the auto trans, get the suspension tweaked, all that fine tuning stuff. Used the Explorer sway bars, kept the rear axle as spring under, have the Explorer traction bars (soon as I figure out where the one bolt ran off and hid at, they’re going on), moved the passenger side shock mount to behind the axle in the rear, it’s a beast.
Anyway, if you want manual transmission, I’d definitely say ZF5, but it’s a big honker. You can try the M5OD, but it may or may not last. ZF5 should be plenty stout, but they would be out of F-250 and F-350 trucks and you would need the SBF (Small Block Ford) bellhousing one, more specifically, one behind a 300 straight 6 (4.9L), or 302 V8 (5.0L). Supposedly one of the 351 varients also used that bellhousing, but the others I know used the Big Block. One of the differences between the two ZF5 patterns for the bellhousings is that the SBF uses a slave cylinder in the bellhousing like the RBVs, but the Big Block one uses an external slave cylinder where it mounts on the outside of the bellhousing.
There may be other transmission options, I’m certainly no expert