If you want the car for what it was intended - to be driven, then a car with a new engine for whatever reason would IMO be preferable over a car with the original, particularly if has been replaced under warranty by a Dealership.
It's the next best thing to buying it new, albeit used.