if you're comfortable doing wiring, and you have the schematics for both rigs, then it seems very plausible that you can do this.
the reason why you're seeing suggestions to go with XJ stuff is that, with a donor rig, it all more or less bolts in because the MJ and XJ share bady parts. with the YJ engine stuff, you might find that the wires aren't long enough to reach a spot where you can mount the pcm, or the vacuum lines need to be all custom, or a plethora of other things that are dependent on each particular items position in space inside the YJ bay vs the MJ bay. It could be a HUGE hassle. or it might not. I can't say because I've never seen it done. But that just means you're blazing new trails! There's no reason why it can't work, just reasons why it might be a headache now and again.