I had morre fun building my 258, than swapping in a 4.0 with all it's sensors and what not. I have a holley TA 470 4 barrel on an offy intake, comp cam, 4.0 head with rollor rockers, header, MSD, DUI and so on. I don't miss a V-8, this thing gets it done. The fuel pump is on the engine and easy to get to. There's not a bunch of sensors or computer to worry about. The holley TA series carbs are made for off road and will take extreme angles. The 4.0 is a great engine, but so is the 258. If my jeep came with a 4.0, I would have worked with it. My 87 had the AMC 258 that allowed me to use a lot of the old school hot rod tech, it was easy, fun and not that expensive to build a ground pounder I-6. I've had both, 4.0's and 258's, I tend to lean torward the 258 because of there simpicity. The 258 comes with a crappy stock carb, but once you do away with it, then the sky is the limit. Good luck with your swap, but I would research all that can be done with the 258 before you throw the baby out with the bath water. Don't swap just because everyone else is doing it. Simpicity can be your friend when your out in the boonies.
1987 wrangler, 258 I-6, 5-speed.
2007 liberty sport 4X4, automatic
2009 ford ranger 4x4 FX4 OFF/ROAD, 5-speed