I turned a 2001 Limited w/ a 4.7 into to a 1999 4.0 Limited/Laredo
The '01 is a really clean Jeep w/ 160k miles on it. All of the oil leaked out so the motor was junk. The hole in the oil pan looked as though someone drilled a hole in it.

I picked it up for $1000.
The '99 I picked up had a junk title, so it had to be parted out. Only 46,000 miles on this one. It turned out the Jeep was in a side and frontal collision, and it was fixed very poorly. Strange thing is, it was totaled out back in 2000. Im used to paying $700 on average for a WJ Im going to part out, but I picked this one up for $2000 because of the low miles.
My favorite thing to do is buy a WJ with a bad motor, and a WJ with a good motor that was in an accident. Then I make 1 good WJ out of both of them, and sell the rest of the parts.
So... why not turn a 4.7 WJ into a 4.0 WJ? I would swap everything over, including all of the wiring. Everything except for the axles and suspension. I would have Quadra-Drive w/ a 242 t-case, and basically have a Limited, without the blend doors.
The project took 2 people 5 days. That includes disassembling both jeeps, and swapping everything over.
First, I wanted to get approval from the EPA because I didnt want to have ANY problems down the road when getting an emissions test. It took a few months getting bounced around from EPA person to EPA person, and from the Illinois EPA to the Federal EPA. The only document the EPA has on engine switching (federal or state) is dated 1991
Seen Here. Thats even before ODB-II! The only thing I was hung up on was the fact that I was going to put an older engine into a newer vehicle, and whether the VIN had to match the PCM or not. All of these EPA people kept trying to give me technical advice on whether the swap was going to work or not. FINALLY, I get a hold of someone from the Illinois EPA who cared to give my questions the time of day. After months of these parts sitting around my house, I finally got something in writing from the EPA approving my engine swap.
Towing:
The motor still ran, but I decided to take it apart to see inspect any damage:
Metal shavings in the oil pan: