I plan on going with aftermarket rims with 4.5 backspace so that should give more room
The lower back space will move the tire out to be closer to fender contact (typically not what you want off road, except possibly for a look that appears like a wider tire and track width).
Stock rims are 15x7 rims with 5.25 inch backspace.
A stock height 84-95 XJ will fit 31x10.5 tires on stock rims.
Tire rub on the lower control arms can be eliminated by adjusting the steering stops on the axle spindles (or just don't hold the steering at full lock). The corner of the tire tread may also rub the lower front fender flair inner liner in a bump while turning, but this minor rubbing is limited to the black plastic liner. These two points of tire rub contact will occur with or without any lift, and with almost any back space rim and 31 inch tall tires. If you do not get twisted up off road, the 31's will only rub in these areas.
With the stock rims and 31 inch tires, you may get some tire rub above the front coils and inside the rear fender tubs above the axle, at full flex off road with the sway bars removed, but that inside rub on smooth metal is preferred to outer fender rub on sharp edged metal.
If you experience more tire rub, the addition of 1 inch to the front and rear bump stops will eliminate the concern (a hockey puck up front inside each spring, and a spacer in back above the bump stop, what is needed at any lift height and taller tires).
.
A point of reference on back space, is that I run 33x12.5 tires on 15x8 rims with 4.75 inch back space (no need for rims that push the tire out further with less backspace, just fender trimming and flair relocations, and a little more lift height).