Well as far as reliability, will swapping another engine improve reliability?
-Maybe, depends on depth of planning, knowledge of engine (history), transmission, tcase, axles, etc. Rebuilt can certainly be hit or miss and there's so many factors involved.
-If you go diesel whether common rail or mechanical, they'll both almost always get you home, in ways gas engines won't. Blow a head gasket, stretch a head stud, leaky radiator, crack the block, ECU fails, most sensors fail, Turbo fails, they'll still run (unfortunately sometimes you won't even notice until you do something that requires a lot more power from the engine). Sometimes though a lift pump (if needed) or something, can go out and you're stuck, but I think these normally give warning and most of that stuff outlasts their gas counterparts. Some gas engines, especially inline 6s will run with some fairly noticeable damage.
-Diesel fuel is better to deal with and easier on components (it's kind of a light oil) and you don't have to worry about burning your Jeep down as much, since the fuel isn't flammable rather combustible.
-Environmentally, stored diesel doesn't have many of the problems gas has from vapors. The problem with diesel is when it's burned is that we used to have sulfur in diesel and that is fairly harsh (sulfur diesel will come out the tailpipe with sulphites/sulphates and can get into the atmosphere and dissolved in moisture that's natural in the air and you get acidic rain and in high concentrations, this is pretty bad), but it's not as bad as something like wood heating without a catalyst as far as volume of stuff that goes into acid rain. The other problem with diesel is that when combustion becomes very thermally efficient, you start producing VOCs (same general category as stuff in gasoline vapors, hair spray, perfume, a thousand other things) that are bad for people in extreme doses ie if a lab rat is exercising and inhaling ONLY diesel exhaust then there are signs of lung damage. Note: according to CA testing, VOCs are much higher indoors than outdoors and diesel is almost non-existent in air quality testing ie the car regs are actually doing a pretty good job, but maybe we are bit on the extreme side of gasoline vehicles, especially if you're interested in the Carbon debate.
-Most diesel engines, when geared properly and have enough torque for the application without getting too massive, will do much better for volumetric efficiency compared to gasoline, especially the 2.5L. I'd expect at least 40% increase in MPG for a diesel. So if you've got the 19 gal tank and 5 gal spare, then it'll be like having an extra 10 gal of fuel, but in off-road conditions, maybe more like 12+ or maybe just run the 19 gal and you'll still be ahead and save 40 lbs and some space.
-Diesel engines can handle more fuel variants, especially mechanically injected diesel engines, but the newer and more precise, high pressure the injection system is, the less variance until you may damage something and mechanical injection on diesels are typically more expensive to rebuild compared to common-rail, which is expensive too.
-Of course a bad pulley or water pump, etc could go out and you could be stuck. The nice thing about the Jeep is that I can go to most Auto parts stores and fix that stuff in the parking lot. And I've had weird noises in the past, when travelling for work and on my lunch break prevent a situation that would require me to be towed.
Cost?
-The cost of these swaps in hours and money is a bit high relative to keeping your current engine. Vs another vehicle then you get a big ol' depends.
-I don't consider resale, since I'm not going to sale. Plus vehicles are mostly just a loss anyway.
-It's hard to put a price on something that practically doesn't exist and few want to get into someone else's project.
Jeeps are great, but there are more options out there. The Hilux from overseas comes to my mind (do you want something designed for an expansive network of high quality roads, or for what you're ACTUALLY wanting to do? They've got one of the best diesels too, just gotta wait 25 years to start the process).
I think your transfer case makes more of a difference in your kind of conditions than most people give credit. A lower ratio would give you more torque for obstacles, control and going slow often increases traction (static vs kinetic friction). Going fast and trying to burn your way through something is a great way to lose control, but it can be fun and sometimes necessary. With worn out tires in with my truck in 4-Hi, it's almost useless off-road, but 4-Lo and I'm making it through much more stuff and when I get stuck, it's only 1 axle rather than 2. I haven't had anything with a crawl ratio under 60ish:1, with ~32" (use this for crawl speed) tires, but it's night and day vs the 32ish:1 of the TJ (with 29s-33s), which IMO is almost a waste of time. I have no experience with a ratio higher than the truck, but I'd imagine it wouldn't hurt, but may get annoying if it's your only option.
Also with a light vehicle, I prefer a more narrow tire in the slippery stuff, but can't comment on rocky stuff. I've never been stuck so much as when I had 33x12.5s, but admittedly the tread sucked, so maybe coincidence.
Unless you really love your Jeep and want a diesel, then stick to what you've got or sell it and get something else if you think it'll do better. Gas cans are cheap. Gear changes are relatively cheap too. If you enjoy being out more than wrenching, planning, fabricating, or you don't have a bunch of money to have someone do that for you, then that's another reason to stick with what you got. I've barely been able to get out and do anything fun, besides a few hunting trips, in order to work on my Jeep and just plain life/work stuff in the last year. That's not all the swap's fault and it's not all bad because I do enjoy it, but time is finite. I've spent years wanting a Jeep precisely as I want it to be built and exactly how I want it outfitted. Now there's only about 10-15 things left to do on the Jeep build and years to finish them.
Maybe run it until it's complete blown, get something similar and then you've got a project vehicle where you can take your time gathering components. I've planted a lot of projects, so my leash has become kind of short with the wife.