Electric will never replace fossil fuel. Until something better than electric is produced we will always have gas cars. We are a go society and people simply will not wait for a recharge on the road and batteries simply lose capacity the older they get.
With proper management li-ion batteries hold up quite well over time. There are people who have Teslas from 2012 and 2013 still driving on the original battery and they have only seen about 5-10% degradation. But even accepting that batteries do lose capacity with age, with an ICE lots of things degrade with age: all the moving parts in the engine, seals, fuel pump, water pump, alternator, transmission, etc. Not to mention periodic oil changes, changing belts, hoses, etc.
My Buick had effectively less range when I sold it than when I bought it because the fuel tank had accumulated gunk in the bottom that meant when the car got down to about 2 gallons, it was a good idea to put gas in or the car ran very poorly.
The drive train in an EV is vastly simpler than an ICE which means a lot less maintenance as time goes on, even if the batteries do degrade, it's one of the few things that do.
Solid state batteries are coming. There are several different chemistries being tested in labs now and there is a good chance at least one of them will be showing up in EVs early next decade. The initial range boost will probably be somewhere around 2X over current tech, which means the flagship Tesla Model S will be getting around 600 miles on a single charge. For most people, that's en entire day's driving. Solid state batteries might be able to be charged faster too, which would allow the "iron butt" drivers to drive cross country almost non-stop. But people who drive more than 8 hours in a day are not that common.
And even with the current situation, road tripping is actually more pleasant. I have done 600 miles in one day in my Model S. It took a little longer, but I wasn't as worn out as when I did that much in an ICE because I had forced stops where I had to get out and walk around. I also saw some things I wouldn't have seen otherwise. And the stops for supercharging aren't really that long. If you are stopping to eat too, the car will usually be done before you are unless you wolf your food.
I do believe fossil fuels will be around for 50 years or so. For some applications, it's going to be a while before battery tech can replace them, like aircraft. Electric aircraft exist, but the are short range curiosities and will remain that way as long as the energy density of batteries is so low compared to fossil fuels. Some long range driving situations like into the outback of Australia or some remote places in North America will require ICE because you can carry 1000 miles worth of fuel with you and it doesn't take up all your space.
Ships too will probably remain fossil fueled for some time, though new tech sailing might become a supplement to fossil fuel engines. One reason fossil fuels replaced sails was the speed, but another factor was manpower. Maintaining sails in the old days required a lot of people which is expensive, but computerized sail management could allow ships to navigate on wind power quite cheaply. It would be good for cargo that is low priority and could afford to take a little longer to get there.
For surface land transport, electricity will probably replace ICE over the next few decades. Once the disruption starts, the limit will be how fast battery factories can be built. Once people learn how much better EVs are, in every way, there is no going back. Even if it does take a little longer to charge them, that makes no difference for daily use, and it isn't that big a deal on the road when you make the cognitive adjustment.