An engine fails after a turbo failure for a couple reasons which may or may not be identifiable right now.
Bearing material in the oil will cause highly accelerated wear throughout the engine. That material may not immediately be caught in the filter as it lingers throughout the lines, pan, oil galleys, etc. No compression test will tell this, and it may not fail immediately and by the time the turbo failed, that material has probably been circulating in the oil a while already so damage is already done.
The turbo itself can send broken fins through engine and cause damage. This could be picked up (possibly) with compression/leakdown tests.
In either scenario, it's not uncommon to see engines fail shortly after the turbo does so if the OP has any hesitation about having the funds for a new engine after a turbo failure, they should just jump ship now...and it sounds like they know this.
I think it would be best to assist OP in ways to salvage value most effectively.
I bought my 2004 XT knowing it had some issues. I suspected that the Turbo was bad, and I was right. (it doesn't need all the $5000 worth of other work the shop claimed it needed).
I replaced the turbo with a used one I bought off of someone online (kijiji) and have put 20K on it since then. Still works great.
Yes, there is a chance that other components in the engine are contaminated/damaged when your turbo goes bad. But it's not "for sure".
When I bought a 2009 XT with engine issues, it had serious engine issues, AND the turbo had gone bad. I replaced the turbo with a used one. But the used one was bad as well. But there was no damage to the body of the turbo. So I spent the money on a new Melett cartridge. Car has been running great. (put 5K on it so far)
just make sure you do an oil-change after changing out your turbo and clean our your banjo bolt-screens (or just remove them).
It'll be cheaper than scrapping your car and buying another one!
I'm not sure if this is in your budget at all but you can get an EJ20X on eBay for about half the price of an EJ255. They are usually a direct fitment swap as long as you can find one that uses the same cam position sensors as your core and as long as you utilize your intake manifold from your core. If this is something you're interested in doing feel free to message me, I've done many of these swaps
All very informative posts here. One of those most overlooked items in the turbo system are the banjo filters to filter stuff on the turbo itself. Cheap oil, not changing it regularly, are a couple of the top contributors to early deaths of Subie turbo motors.