Stay 4 cylinder is the best choice, the truck is already set up for it. Rebuild the 2.3L, maybe hop it up a little with camshaft and compression bump. If you're feeling a little crazy, swap in a 2.5 from a later 90s Ranger, it's the same engine platform. If you want to go a little wild, forced induction on either of those. Maybe look at a gear swap if you want better performance out of it.
If you're going to swap to a V6, 4.0L is only logical consideration. The cost is practically the same unless you own the 2.9L drivetrain already. It is the same amount of work to swap the 2.9L and 4.0L. The latter is newer, more powerful, more reliable, and pretty much as good on fuel mileage. The good thing about either is that it can be a bolt in swap with pretty much all factory parts. Swapping in an older engine just isn't worth it, not to mention illegal per federal law. Per federal law, the engine must be same year or newer and retain the engine's emissions equipment. Of course if the vehicle is not in an inspection zone or is exempt, who is going to know.
The good thing about any of those is that they can be a bolt in swaps using all factory parts. You can get everything you need from a donor car and/or junkyard. Easily supportable through your local auto parts store.
V8 swap is pretty much the same amount of effort as a V6 to install, but isn't as much of a simple bolt in. An Explorer 5.0 drivetrain is a fairly easy swap into most Rangers, though the wiring can be a challenge if you want to keep the EFI. Being a first Gen you will need to change oil pan and pickup tube to clear engine cross member, IIRC Mustamg double sump works. Will require custom engine mounts, some body modifications to make it fit, might need a custom driveshaft. You will want headers that fit in the frame (stock ex manifolds suck) and exhaust to support it. That also means more money, and maybe more time, to put it in there.
When it comes to long term viability of engine swaps, being unique is not a bonus. I know that somewhat contradicts a thread I just created about swapping my F-100. IMO an old chassis with stock(ish) engine, is better than a newer chassis with an older less supported drivetrain. In that situation you're going in knowing that both are old and not well supported and everything is designed to work together. An old chassis with a newer engine is better than both, old style and supportability of a modern drivetrain.