I would prefer a high mileage that's been maintained over engine change.
Reason being, new engine history is unknown, new engine (whether full replacement or rebuild) quality is unknown, repair job quality (desi ustaad) is always questionable. Why was the engine changed in the first place? Lack of maintenance? Cheap parts?
I have 9 yr old 660 turbo, original engine, no issues alhamdulillah. Still going strong because it has been maintained well.
The only way I personally would be happy with a replacement engine would be: the replacement was in excellent condition, low mileage and the work was done properly.
More experienced members can chime in on this, as these are my own preferences.