The XJ 4.0's before 91 used the Renix fuel injection system. This is a completely different system then the 91+ HO (High Output) system. Some parts from HO engines can be made to work with the Renix system but not the sensors. Some like the Renix and some do not it does use more sensors then the HO system so is more work to swap over. Also it does not have the after market support that the HO system does.
I know that he will:
* Need to block off some water passages in the 4.0 head.
The pre 91 head is not much improvement over the 4.2 head. The preferred head is the HO 91 through mid to late 90's head (casting number 7120). In the mid to late 90's they changed heads again to smaller exhaust ports for emissions reasons. These later HO heads are still better then the 4.2 head but not as good, also there was a problem with the castings on some of them. I am not sure if the 88 4.0 head will need the coolant passages blocked or not.
* Need to either get a gas tank from a 6cyl. injected YJ or modify the XJ's tank.
A 91+ YJ tank with internal fuel pump is one option, as is an aftermarket external electric pump rated for the pressure of fuel injection.
* Need to run a return line to the gas tank.
* Will the existing fuel line be OK? I don't know if 21 year old lines that were set up for the basically zero pressure of a mechanical pump work with the 40+ psi of the electric pump.
There should already be a return line but it is rather small, so I bigger one would be a good idea. Also a new supply line and hoses are defiantly
needed from the pump forward. All new hoses for the supply line need to use fuel injection type clamps on the line not the standard clamps. The old supply hose will not hold the needed pressure and when they fail will spray gas everywhere.
* need to hook up the XJ's throttle assy.
* need to wire up the OBD computer and have a check engine light. The YJ is a 5 speed, but I'm not sure about the XJ, so if it's an auto, there will be other issues.
* need to get the distributor from the 4.0 to work with the OBD, since I can't see how the mechanical advance from the carburated engine will work with the fuel injection. I don't know if they interchange, since the 4.0 was a modification of the 2.5l architecture, not the 4.2l.
* I'm assuming that the motor will now need a crank sensor, since I know the XJ has one and I doubt the 4.2l had one. Is this something that can be added or modified to work?
Will need to install distributer (it should bolt in fine), Intake manifold with injectors, and throttle body, all sensors, computer, and add Check engine light, cam sensor (is in the distributer), and crank sensor. Basically anything that is connected to the computer needs to be there and connected.
The Renix or HO crank sensor is in a little window in the bell housing. A mount can be built and a hole cut in the YJ bell housing and the 4.0 flywheel used. Or there is a kit to relocate the Crank sensor to the vibration dampener on the front of the engine, this kit is made to work with the later HO injection systems so I do not know if it will work with Renix.
The HO system used a different computer for manual and automatic transmissions, I do not know about the Renix.
* need to come up with an exhaust pipe.
If a 91+ HO head swap is done then a new exhaust manifold will be needed, I am not sure if it will be needed with a Pre 91 head. If he keeps the YJ head then no changes are needed to the exhaust, except for installing the O2 sensor from the XJ. The YJ manifold or pipe will already have a O2 sensor and fitting.
I have no direct experience with the Renix fuel system, some dismiss it as junk while others think it is okay. It is not much used in swaps as it has more sensors to hook up and did not make as much power as the later HO system. Also since it was only used for a few years parts are more difficult to get. If it where me I would try to get a 91+ HO system, they are more common and the knowledge base and aftermarket support for them is much better. A Renix swap will likely work though, but finding information on it will be much harder.