Compared to buying an actual NEW vehicle, virtually anything done to an existing paid for vehicle comes out ahead . The more relevant comparison is what you would put into existing vehicle vs replacing with a different used vehicle that is younger or has fewer miles, and hopefully is in decent shape without need of significant repairs in near future .
To somewhat reshape a previous response , do you have time and space to do work on a vehicles ? If no , move on to next option .
If you are a " car guy " , and enjoy projects , then take this as opportunity to step up . Rough rule of thumb - getting all the necessary tools will cost in same neighborhood as the labor to get it done once . BUT you will then have the tools and equipment to do lots of future repairs/ improvements/ projects . Remove & replacement of a complete engine of the same type for the first time can seem intimidating , but not actually that complex . Get a good service manual , consult the internet , be careful and pay attention , and label and take digital pictures of everything you take apart . A good learning experience , and it will seem easy the second time you do this .