In its current state, would you realistically get the £5000 if traded in? If you could get another engine, in good condition, fitted, what would be the trade in value then? What you then have to factor in, is, would you get a car that suits you as much as this one has done, or would you be sacrificing some things such as age, trim, ICE, engine, different model, or even make, etc to meet the budget you have for a replacement? It's your choice. If getting another engine fitted brings the car back to a condition that you'd consider keeping it for another few years, or, you can commit to the cost of replacing it, either on a like for like (ie, 66 plate) car, or something a bit newer with a few extra bells & whistles. It's your finances & you are the only one who knows which makes the better financial sense. Perhaps a discussion with your garage to see if they can offer a fixed price, maybe with also obtaining an engine in that, plus a warranty on the work, will help you to make up your mind one way or another. Good Luck whichever way you decide.