2008 will have the 2.3l DOHC which rates 145HP
Older 4.0l OHV only rates 160HP so wouldn't be a good swap
Newer 4.0l SOHC rates 207HP so could be consider, BUT..................
Since you will have to swap engine and trans, plus computer and wiring, a V8(5.0l) might be a better choice.
The work that will need to be done will be the same, for either.
And with either you are creating a Frankenstein vehicle, so lower resale price, V8 would just be a better direction, IMO.
You will need to move the transmission mount I believe and change driveline, and possibly change the axle gearing unless it is a 4x4, 4x2 Rangers with 4cyl engines usually had low gearing numbers for better MPG at highway speeds, 4cyl regular cab 4x2 = buyer wanting good MPG not power.
Generally 4x4 will have 3.73 ratio
4cyl 4x2 3.45 and 3.08
Have a look here and at your drivers door sticker to see what you have: Ford 7.5 & 8.8 Inch Axle Tag & Door Codes
OPEN is a standard "car" differential, only one wheel gets power
L/S is Limited Slip(GM calls it positraction) both wheels get power
If you can find a damaged Ranger with 4.0l SOHC and can buy the whole vehicle then that would be the way to go.
Or a V8 Explorer.
So you have a donor vehicle that you can pull parts off as needed.
One of the other things you need to know is that your 2008 has a PATS(passive anti-theft system), a 2001 Ranger(first year of 4.0l SOHC) and up will have this also.
1998 and up Explorers will have this.
PATS has a "key reader"(wand) wrapped around the key slot, this is connected to the PATS module(usually above glove box), and PATS Module is connected to the computer.
PATS Module and computer are "married" at the factory, so they are a set, neither will work without the other, or with another.
The key reader(wand) is just an antenna, so doesn't need to be changed.
Only a Ford Dealer can remarry PATS Module and computer, and it usually takes 1.5 hours shop time, it requires an active subscription to Ford Database and live connection to that data base, it is a slow process on purpose, point of anti-theft wouldn't work if it could be over ridden quickly, lol.
The way the system works:
PATS keys have an RFID "tag" in the black plastic end, these require no power, they get power from the Wand.
Each RFID tag has a unique serial number.
Vehicles are sold with 3 or 4 "working" RFID keys, the serial numbers for these are stored in the PATS Module and computer nonvolatile memory, can't be lost.
When you insert a key into the ignition the RFID tag number is read and if it matches a number in memory then computer will allow spark and fuel.
Most locksmiths and any Ford dealer can add and erase RFID tag numbers in PATS Module/computer.
But if you have 2 working RFID keys, with different numbers, you can add a 3rd or 4 key yourself.
You can also "clone" an RFID key, if you only have 1 working RFID key there are few places that will read the RFID tag number and then write that number to another RFID "blank" tag key.
This will give you a backup key but can't be used to add more keys, because as far as the PATS module is concerned you just have the one "working" key, one tag number.
Anyway, the point is that if you can buy a donor vehicle with working PATS keys you can swap over the whole PATS system to your vehicle, remove your ignition cylinder with your current key and replace it with donor vehicle's cylinder.
Something else that you might consider is turbo charging the 2.3l DOHC, you keep the good MPG but have some extra power when needed.
Not sure on the cost of this or if you would need beefed up pistons, rods and crank, or a stronger trans and axle.
Just saying it might be worth a look.
Mazda cars used the 2.3L DISI Turbo, 265HP