Life of the engine with poor handling of the previous owner

Hello, let’s assume, I buy a very young car, e.g. 3 years with 30,000km. And let’s take it at the previous owner has done pretty much everything wrong with it, what you can do wrong – the first few thousand kilometers not gently entered, a lot of short distance, never warmed up, etc. Is then the fate of the engine almost already sealed? So as a second owner I have at all a chance even with best care, to keep the engine alive for a long time, or is t because in these 30,000km so much has been done wrong, that the fault points are already so blatant that it doesn’t make a big difference anymore how I deal with the engine?