The problem with the LGTs is the banjo bolt that controls oil feed to the turbo has an inline wire-screen filter. If the PO was negligent with oil changes or PCV maintenance, any sludge will clog up the filter and starve the turbo.
Later WRXes (09+) also have a similar banjo bolt filter design but I've heard of fewer failures on them, probably because they fixed something but might also be because Subaru started mandating synthetic oil and extremely short OCIs.
That's most of where you see the reliability problems coming from - most shops will keep farting another turbo in over and over while happily ignoring a car with huge blow-by and an oil cooler filled with turbo swarf.
If you get the car, take the banjo bolt out, remove the filter and clean everything out. Most people delete the filter altogether at this point. It's all pretty well documented on the enthusiast forums, and then stick to a regimen of a good quality filter and synthetic oil.
Transmission pull and replacement isn't too hard. I would probably get a new Group N transmission mount, Extra-S gear oil and some transmission crossmember bushings ready for when you do it. You might as well go nuts and get one of the TiC "Clunk Killer" kits and do the differential and outrigger bushings while you've got all that room under the car to mess with it. Could probably also do one of the shift bushing setups at this point, like the old TiC "Holy Shift" kits, since it'll be ever so slightly easier.
You do need to match the final drive - 02-07 (and probably more) WRX transmissions are not the same final drive as the 05 LGT (4.11 IIRC). It's a good way to chew up a rear diff at minimum. There are some rebuild gear sets (PPG, Andrewtech) if you're feeling particularly brave, but I'd probably just find another trans from a wrecked car and hop it in.
If you really want it to be bulletproof you could also look at replacing the oil pickup tube with something like a Killer B; on the EJ255 it's reputed to be fragile and although I have no anecdotal evidence myself, I have had friends kill theirs from the problem. A decent crank baffle might not be a bad idea while you're in there, either.
Note that the LGT Spec B transmission is different from the LGT transmission - it has another gear (DCCDless 04+ STI transmission) and a different rear diff with freak one-off rear axles.
Transmission codes are written on a sticker on the bellhousing of the transmission, which is often visible with the hood open if you squint. You can use one of the many Subaru transmission code tables to look up trannies that will be compatible, such as this one.
Canada got the LGT wagon for an extra year so you could always look at parts up here.
The LGT wagons are a very special car, enjoy it.