Anyhow the lifetime targets are usually in the range of 10years. And there are good economic reasons to do this, because if you set the lifetime target of all car components to 10years, then you anyhow risk having some things fail during warranty or while the leasing contracts are running.
Indeed. The thing is, cars are a poor example in terms of the OP's question, which was about the lifespan of
electronic components and devices. Cars are different because they have loads of mechanical parts, and those have
loads of well-understood ageing mechanisms.
I had an acquaintance who worked for Siemens in Canada. They make lots and lots of components and modules for cars. He explained to me that the generally expected service life of a car is around 4000 hours, which sounds scarily short (less than 6 months). But in reality it means 120,000 to 160,000 miles when the vehicles overall average speed is 30 to 40 miles per hour. Most of the components are specced to meet that lifespan. He gave me an interesting example of a BMW component he was working on - a radiator fan (I can't remember the model of car). The specified service life that BMW wanted was 1000 hours. Now this does
not mean the car will need four radiator fans in its life; rather, it means that BMW expected the fan to run about 25% of the time the car is in use. At the same time he was developing a fan for Ford, who wanted 1500 hours. He said the Ford most likely has a lower bonnet profile and shallower grill, requiring the fan to run more often.
Unlike electronic components, mechanical ones are very predictable in terms of ageing. Friction, wear and tribology are well understood. The lifespan of the brushes used in a DC motor can be predicted with great accuracy. Ball and roller bearings have charts published by the manufacturer showing how the bearings ages with load and usage pattern. The piston rings, camshafts and followers use exceptionally well-controlled materials and manufacturing processes in order to meet the designed durability. Toothed cambelts are so familiar by now that their life can be predicted with confidence, although they are slightly different as they are considered to be a consumable. Plain bearings, like rolling element bearings, are extremely well understood and easy to design for a particular lifespan.
The only really serious cock-ups that have occurred in recent decades arose from the innovative use of new materials. Everything from cam chain tensioners and thermostat housings to complete, variable-length inlet manifolds were re-engineered in plastic, and it is true to say that many unanticipated failures occurred. Jaguar got burned in the late 1990s when they introduced plastic cam chain guides and tensioners. At the next revision they went back to using aluminium.
It is important to point out that the 4000 hour lifespan of a car does
not mean it's scrap after that time. Rather, it means that the overall failure rate will go up as the various components come the the end of their design life. It is often feasible and cost effective to keep the car going for significantly longer.
So yes: designing mechanical devices like cars, aircraft, even spaceships for a particular service life is possible, even routine. But electronic components have so few ageing mechanisms (but not none) that designing them to fail after a given amount of service is extremely difficult, and for most purposes impractical.