Currently it is possible to make gasoline powered cars last much longer then their battery-powered equivalents. My grandfather's Zhiguli kopeyka (VAZ-2101) was purchased in iirc 1973. He drove it until 2006 at which point he sold it. I wouldn't be surprised if it's on the road today. From a standpoint of reducing carbon footprint manufacturing and disposal has to be taken into account. Producing fewer cars but having them last drastically longer can offer major gains in reducing that impact. Again I'm not saying EVs are definitely worse. But I'm not sold that, when analyzed holistically as a transportation system, they will come out ahead with current technology, and there are improvements to be had not only with EV tech but also with gasoline-powered vehicles.Battery life isn't the same as service life, though.
My experience of hybrid batteries (obviously, not the same, but a useful reference) is that they can last a very long time & for a lot of miles, in a duty cycle which is quite hard on ICEs - taxis. Taxi drivers here in the UK were slow to adopt hybrids, despite the claimed fuel economy advantages for stop-start urban cycles, because they were concerned about the lifetime of batteries & the cost of battery replacement. In recent years that's changed, because they now know that the average battery life is much higher than they expected. Manufacturers such as Toyota now give a much greater warrantied battery life than they used to.
A few years ago a taxi drive my stepfather knew had a hybrid which had done 300,000 miles & the battery was still good. When the car finally wore out he intended to buy the same again. He reckoned that it had saved him a lot of money in both fuel & maintenance over a conventional petrol or diesel fuelled equivalent. Not a statistically significant sample, of course, but the very high number of new hybrid (including plug-in hybrid) taxis suggests that it's not atypical. There are also all-electric taxis appearing on the streets.
My stepfather got a very good trade-in price for his 13 year old hybrid. My wife was offered far more than she expected for her first hybrid when she traded it in for a new car. They'd both done over 100K miles. The cost of battery replacement is factored into what dealers offer, of course, but trade-in prices seem to be higher for both hybrids & all-electric cars than conventional ICEs.
Of course, the type of driving you do affects it. Lots of long-distance motorway driving isn't the ideal regime for electric vehicles to demonstrate advantages over ICEs.