I've owned 6 XJ's over the years and one WJ. My dad currently has my old WJ. I had an 02 WJ overland. The overland was made in 02-04 in the WJ. Came factory with skids, quadradrive, tow package, 3.73 gears, rock sliders, and the HO version of the 4.7(the ho came with forged internals.) the 02's and early 03's came with upcountry suspension. Up country sat an inch higher and had nicer monotube shocks. The WJ is roomier, has coils all the way around, rides nicer, and has a much more modern interior than the XJ. The WJ tows GREAT and has gobs of power if you get the v8. That's something to keep in mind if you plan to lift and run a bigger tire. The 545rfe transmission behind the 4.7 is solid. It's the same trans they put behind the 5.7 hemi in ram trucks. The 4.7 can be a good motor if it's been maintained, but isn't as reliable as the 4.0 and doesn't take as well to neglect and abuse as the 4.0 does. They're known to be prone to sludge and can drop valves. Anal maintenance is key to keeping a happy 4.7.
With that said, the XJ is more simple, has a lot less there to break, has the bulletproof 4.0/aw4 combo, and has better aftermarket support. It has leafs in the rear, rides more rough, isn't as roomy or comfy, and has fewer amenities.
Given the two vehicles, I'd pick an XJ all day long just because of the sheer reliability and simplicity, but the WJ sure is a nice capable jeep. I just don't trust them like I do an old XJ.