I had chronic alt problems on my XJ as well. However my AC still worked and with the family often riding along I wanted to keep it that way.
Rich(Capt Crunch) gave me a tip that works great. The way the alt is mounted puts the brushes at the bottom of the alt and the vent holes at the top. This causes mud/water to settle at the bottom of the case and cause the brushes to get stuck in their holders and lose contact. I can confrim this 1st hand as when my alts died a sharp rap on the case often got them going again and any time I pulled them apart their was lots of mud in the bottom of the case and in the brush holders.
His solution was to just re-index the case so the brushes were at the top and the vent at the bottom. This allowed the mud to run out the bottom and kept the brushes higher and drier. After I did this I didn't have any more alt problems.
The procedure is simple, remove alt, remove the 3 case screws and split the alt apart. Now reassemble the case so the brushes are near the top mount. When reassembling the case a wire needs to be insterted into the brush holders to hold the brushes in against the spring. Remeber to remove it when assembly is done.
I know it sounds simple but this seriously worked for me. Before my alt would screw up almost every run. After I did it, no more problems. Remounting higher IS better, but if you're not ready to ditch your AC, try this.