Yes, it can be done, and has been done. IMO if you are looking for a motor to swap, 7mge is more bang for the buck, but if the 5m is what you have, then by all means, use it - either way, way more power than the 22re.
I know the motor mounts won't fit, and it seems like native 5m exhaust runs on the opposite side from 22r so you'll have to fab that too.
It's more ocmmonly done in the 2nd/3rd gen bodies, but the engine bays are pretty close to teh same size so it should work just the same.
The most fun part will be the wiring.