I know it can be done, others have done it (I have not). If you use newer Sammy parts from 88.5 and newer model years the diff flanges will even mate up with the Tracker's. You may end up having to use wheel spacers to push the tires and rims out from the suspension, but it is doable. There is a difference in the frame widths you would have to factor in.
Can't say for sure on the autos, but the M59 I have in my 2002 Tracker has interchangable parts (like the shifter tower) with 97 and 98 Tracker manual trannys.
Before you begin your project, I'd recommend you spend twenty or thirty hours perusing the search engine here on Zukiworld. Try key words like: SAS, or Sammy axles under Tracker, etc. There are ALOT of guys and even gals on here who have modified their trucks many times over the years. There are quite a few hard core builders here on this site and a couple others who have the skills, the imagination, tools, equipment and money (not to mention tremendous energy) and have performed incredible modifications on their vehicles. Stuffing Audi engines in their 1st gen trucks, putting Toyota axles under their trucks, etc. They are all willing to share information, their ideas as well as the problems they encountered while doing them and how they overcame the problem facing them. First read a bit, then ask questions on those areas you do not understand or cannot find information on. Half the fun of owning these trucks is talking to others who own them too and watching their progress when they post up a build on the site. The other half is driving them. Be forewarned... these trucks become an addiction.