An ea82 5spd will swap in if you make a little bit of tunnel clearance and swap over the 2 piece driveshaft and make a carrier bearing mount. you will need a non-turbo ea82 5sd that has the correct 23 spline axle stub.
Otherwise, when using the 4spd, you can drill out the holes on the ea81 flywheel to a larger diameter to match the pattern on the ea82 engine. The pattern is the same, the holes i believe should be 12mm, but you WILL NEED EA82 FLYWHEEL BOLTS as the ea81 are smaller diameter. The timing marks are about 30 degrees off with an ea82 flywheel, so you will have to transfer tour 0 deg mark, although the center bore hash mark !!! is the same orientation.You should be able to use a whole ea82 flywheel withthe 4spd disc and pp. or ea82 fly and pp with 4wd disc. 5spd disc is totally different
The clearance issue with the disty is mainly the installation process, where it is easier to drop the engine in and then install the disty. You can swap the MC from the donor car , being an AT, as it has less lines and fittings and no hill holder which may improve clearance. In my experience, i cut off a tab on the disty and clocked it way cray, enough th rearrange the wires on the cap to keep firing order correct.
The timing belts covers may be a tight fit between the frame rails. With ea82's i recommend removing the covers as it take s a lot of labor away from changing belts, say from more than an hour to less than 15 minuts if you are proficient. Otherwise, just cut off the bolt tabs on the outer edge.
You will have to swap the ea81 pitch bar mount to the ea82 bellhousing to use the brat's pitch stopper bar
you shouldl use all the ea82 anciliaries and make the ea82 steering pump fit the ea81 lines.
Use an ea82 radiator as it will fit, and the hose orientation will be correct. Here is a hint: the ea82 upper and lower radiator hoses are the same part number.
I have done a few of these, athough the last one was a good 10 years ago. But this is how i learned my subarus.
Judging by your post, you know your subarus and know what you are doing, if only you could see a live example to know what to expect. Good luck with your project; i will be following.