A lot of variables affect laptop life. Hard drives are susceptible to failure a little sooner in a laptop(than with a desktop), due to heat buildup in the confinement of a laptop housing.
Batteries in older laptops just wear-out after a couple or so years; replacements are usually available from the manufacturer and third party generic sources.
Dust can be sucked inside a laptop, and in time can clog up the internals, and require disassembly. Disassembling most laptops are a "don't try this at home" kind-of project.
Malware infection isn't the end-of-the-world, is most simply fixed by reinstalling the operating system(ie- Windows).