Changing from the 2.5L to a 4.0L will require a different ECM/harness, trans/trensfer case change, as well as new engine mount locations on the frame. Going to a V8 has nothing to do with that aspect of the engine swap. The 4cyl ECM/harness won't work with a 6cyl., the 2.5L trans (AX5) is too weak for the 4.0 and the AX5 version of the 231 has a different spline count so it will not mate to the 4.0L AX15 trans. The 2.5L engine mount locations only suit the 2.5L. If you want a 4.0L I would just buy a Jeep with it from the factory and be done with it. But if you were to go to the trouble of an engine swap you might as well make it something worth the effort rather than what you could buy stock from Chrysler.
Axles on a 2.5L Jeep are pretty anemic no matter what engine you have, and it doesn't take much tire to overwhelm them.
Having said all that I have a 2.5L YJ with the stock axles (locked), AX5, and 34" tires and it is a blast to drive off road. The engine has enough power to drive the tires yet not enough to break major parts each trip I go on.