Whathesaid.
The 4.0's don't automatically swap parts from 87-90, and they were RENIX injection, no codes. 91-96 were HO with OBD1, 96- up OBDII. Transmissions changed alot over the years, and later, axles changed from Dana to Chryco.
What you have and what you want to substitute can be a go/nogo on it's own circumstance. If you have a specific part from another Cherokee, we can let you know whether it's been done before, and how much of a mod it may be, if possible.
So, it boils down to make, year, model vs. make, year, model to really get an answer.