With most modern ICE cars everything but the transmission and the engine will fail before those two go out.
Also: I don't think that's the usual case. Plenty of sub 2k cars that will happily keep driving for years (I've had 3 such cars). ~700 mark is where you start seeing 300k mile "finish-them-off"-type cars.
Plenty of EVs will drive for years as well (so long as they have a good thermal system for the battery). So I'm not sure what point is being made.
Saying "It costs a lot of money to replace the battery" doesn't mean much as the battery, even if it has 70% of it's original capacity, is still perfectly functional. Very much the same as the engine which also costs a lot of money to replace.
I just thought the parent comment was unfair to ICE cars to make the EV proposition sound better. I'm a fan of EVs but they are still more expensive to buy.
That said, very cheap ICE cars have a sweet spot where any damage to engine / transmission / clutch+flywheel often means replacing the entire car since the repair cost exceeds the market value of the car.