I’ve got the same wagon in blue that I bought new in ‘05. It is a terrific all around car.
Is the replacement engine stock or modified at all? They are accused of having weak pistons as they frequently break ringlands. Mine was trouble free until around 145k miles when it broke 2, on a stock engine/ tune. Personally I think It’s more that they spec’ed too tight of a ring gap for a turbo motor. Coupled with a too lean in the midrange with the stock tune, the rings expand, butt, and snap the ring land. I’d recommend getting a safer tune to fatten up the lean spots. Also don’t load up the engine too much at part throttle- even though the engine will happily haul you up that long hill in 5th, downshift to 4th. Especially if you live in an area where 91 octane is the best that you can get.
The throttle lag is not the e-throttle that most suspect. It’s the very heavy dual mass flywheel. I switched to a lightened WRX style flywheel and clutch, and it was a night and day difference. A tune may help mask it, but most of the lag is mass induced. It drives like a different car with the change.
The sunroof problem is likely the mechanism that pops the front section up. The small glass section at the front is supposed to pop up like a deflector, while the large section slides back and opens. Mine was only about 2 years old and right at 36,000 miles when it broke. I had to get Subaru involved to get it warrantied, as the trip to the dealer to bring it in put it over 36k (It was under 36k when I first brought it in, they pushed me out two weeks then tried to deny due to mileage.) It was a small plastic piece on the rail that the main sunroof pulled on to pop up the front section. With one side broken, the front section would twist and only pop halfway up, lock, and not come back closed. They are likely telling you not to open it because it won’t pop back down again. When mine first broke, I saw that something was wrong when opening. I stopped before it opened all of the way and it closed just fine. When I took it to the dealer the second time, when they denied the warranty, they opened it all the way and got it stuck. They just gave the car back to me like that. Subaru wasn’t pleased with the pics I sent them. It wasn’t that big a deal to close when I got home. I had to remove the screws that held the front glass in place, then I could reach the mechanism that locked it in place and release it. Probably took me 15 minutes being extra careful. Replacing the broken piece itself looks like a lot more work, the headliner and I’m guessing main sunroof panel assembly need to come out.
Other than that- main issues are the banjo bolt filters for the variable valve timing and turbo oil supply. Most say they get plugged and are ticking time bombs, mine were spotless when I pulled my 145k mile engine, Mobile 1 changes every 5k miles. The oil pickup tubes were known to crack, there are aftermarket replacements and I think an updated Subaru part. The radio and HVAC controls can go in and out. There was a bad solder joint on the board that is common, easy fix. I did have the throwout bearing go bad at 100k. Other than that, I had many trouble free miles.
Edit- one more thing. You mentioned the lag, I was thinking E-throttle and heavy flywheel. I also had the turbo wastegate arm walk on me so that the flapper wasn’t completely covering the wastegate hole. The arm rides in a bushing on the turbine housing. I had to tap/press mine back in. Fixed a lag problem that I didn’t realize was so bad until it was fixed.