well in my opinion if you are going to do a motor swap, a 5.0 would be quite a bit of power for your drivetrain and most of the rangers around today. you'd wanna put new axle's and driveshafts, with a more sturdy tranny, if your willing to do that then it would be better than a 4.0. but if you do a 4.0 it would not be as bad on the drivetrain, but regardless your gonna have to swap the mounts. in my opinion, if your using it as a daily driver, do a 3.0 swap. very reliable motor, and it should line up with no problem and no real power difference so you dont break anything. follow it up with a t5 tranny and you got urself a good reliable motor good enough for another 300k.
99 Ford Ranger 5-Speed manual 3.0 Flex Fuel "work rig"
07 Jeep Grand Cherokee 5.7 Hemi Limited "wife's car"