Google: Ranger Throttle cable mod
Just to see if thats why you have less power, stretched throttle cable
The Explorer V8 swap would be the "easiest" but still not easy, its just been done so many times that pretty much all of the pitfalls have been seen and overcome
So you will know what needs to be done, and the parts you will need, before you start
You buy a whole 1996-2001 Explorer V8 model(2wd would be best for you), you decide on condition, you need the engine, computer and wiring harness, plus exhaust, and numerous bits and pieces
Good article to read here:
https://www.therangerstation.com/Magazine/Fall2009/explorer_v8_swap.shtml
1998-2000 Rangers were pretty much the same, so 2000 swap in article would apply to your 1999, just not the 4WD part
Transmission can be used as well, explorer V8s were all automatics, but 4WD trans is different than 2WD and can't be converted
You can't use any Ranger automatic with a V8