Depends how much you want to tow and how often.
The factory tow package is a hitch, trailer wiring plug & a 3x10x0.75 or so two-pass trans cooler. It's good to 5k by rating but it stops being fun before then.
If I was going to consistently tow 5K around here (2500 ft elevation, lots of hills & tight turns requiring brakes + power to get moving again) I would :
*Gear down in the axles 1 step beyond whatever my tire size called for. This is the cheapest and most reliable route to more pulling power. A stroker, a v8, forced induction - all of those would be awesome, but gears will get it done much much more simply.
*Upgrade rear brakes to disc brakes (and a D35 to an 8.25, if applicable) - disc brakes shed heat much better than drums and are all-around better. Use quality rotors & pads, don't cheap out or your brakes will be worse than OE quality drum brake stuff.
*Heavier rear sway bar, helper spring (or heavier duty spring pack) & stiffer shocks - you want to HD the rear end a bit to keep it stable, keep the ass end from sagging too much & lifting the front of the vehicle (decreased steering response, increased tendency to understeer)
Upgrade front brakes - there are several ways to do this. EBC brake pads, Black Magic brake pads, Vanco brake kit, WJ swap in order of price from lower to higher. The Vanco and WJ swap brakes will get you larger brake rotors, which will take longer to heat up and (I presume) shed heat more quickly. Note that the price jumps from $250 if you put Black Magic pads & rotors on it up to $950 for a Vanco kit.
*Pricing for a full WJ swap is all over the map, depending what you can get cheap / free & what route you go with steering. It's the most involved option by far: but if you want to do it, you can get new wheel bearings, ball joints & a total new steering (drag link, tie rod & track bar) as well as massive brakes.
*Note that if anything on your cooling system is marginal, it will definitely show up when you are towing. I keep reading reports of overheating Jeeps being fixed when the "HD" or "upgrade" CSF / Champion radiators get replaced with an OE style Spectra $100 replacement... Any case, you want to stick with a mechanical fan in most cases and can upgrade to a 97 Grand Cherokee 4.0 "regular" (not "severe") fan clutch if you want the peace of mind. If you are running warmer than you want without a trailer, though - it's going to get a lot warmer still when you put something on the hitch.
*Note... for the price of a beefier rear suspension, a full WJ swap up front, a transmission cooler and gears to make the XJ tow 5K+ happily, you could buy a beater half-ton truck.
Of course, you can just slap a $75 trans cooler on an otherwise stock XJ and tow 3500 lbs with no real trouble. If you want to tow 5K happily or occasionally exceed that 5k rating... consider the above.