So how long your car lasts isn't really a question of how long you personally own it, it's a question of whether you maintain it well so that it stays on the road for the next guy and don't get into a wreck.
If you can afford to do it, it would actually help to buy a new electric car, keep it for only a short period of time and then sell it and buy another new one. Because then you're the one buying new cars and you're choosing a BEV, and every one you sell into the used market is someone who then doesn't have to buy a new car that might have been ICE.
If everybody did that then it wouldn't work -- nobody would be buying the used cars. But there are more than enough people who would never do that anyway because they can't afford it, that it's a gain for all the people who can afford it to do it.
And, of course, the substitution isn't perfect, so if 95% of new cars were already electric then this might not be worth it. The benefit comes from you choosing a new BEV when someone else might have chosen a new ICE. But when existing new sales are much less than half BEV, making the better choice can easily outweigh the imperfect substitution.