Our VS Ecomoo Berlina died while I was giving it a bit of a country run, after it not having had any highway usage for over a year ... ticking noises started & quickly got worse when I had nowhere to pull over which wouldn't have had me punted off the edge of a cliff or rammed by a rapidly-hurtling 4WD (heading down a mountain pass). Probably would've cleared if I'd switched the engine off & coasted in neutral then switched it back on, but the idea of not having any brakes was REALLY scary just there ... *sigh* the things you know in hindsight.
Anyway, it was worth less than yours, and we still decided to resurrect it with a used engine. Reasoning was that we were probably going to get a new car within 18 months, so the cost was less than 18 month's worth of depreciation if we brought the purchase forward; and my better half was quite attached to the car & was OS feeling homesick at the time (we'd had it 10 years, since getting it in pristine condition at 10yrs/100k off my uncle).
The used engine was still going fine 18 months later when we gave the car to the Salvos (they were a bit surprised to get a car with a perfect interior & near-perfect paint - but it would've cost more if we'd traded it than just giving it away, and I wasn't going through all the private-sale pain for a $500 car!).
So ... yeah, you have a value-equation to make.
Among the things to consider would be:
(*) can you afford the ~$2k at this point in time, but not afford the ~$8k a good replacement would seem to cost?
(*) what's the car currently worth (if it hadn't blown an engine)? [be aware that if you stick the engine in it, it'll be worth slightly less as it's now missing a service history]
(*) how good is the rest of it - how good is paint, interior, brakes, suspension, steering, tyres - how much do you estimate upcoming maintenance to be?
(*) do you have any attachment to it - do you car if you crush it?
There are probably others, but list everything out, it should help making the decision a clearer process.