When you factor purchase price into the equation gas vehicles win by a long ways since you need X years of EV economy cars on the market before you can get an X year old used EV. EV's will need to fill the same market segment as today's Chevy Aveos and Toyota Yarii (plural of Yaris?) for a decade or more before they're competitive in price at the bottom chunk of the used car market. E.g. if a 2030 Civic EV is price competitive with a 2030 Civic gasoline then it'll be 2045 or later before they're both competing for the "cheapest cost per mile." Theoretically, the EV wins that hands down because when purchase price is so small the operating cost dominates the cost per mile (less maintenance, cheaper gas). The problem with that is that with current tech you won't be able to find a 15yo EV without trashed batteries, so the hypothetical $2k 2030 gas civic vs $2k 2030 EV civic comparison goes out the window because the EV needs batteries replaced or will need them replaced soon and you can't exactly buy used batteries at the junkyard (they wear out) so you'll need to shell out big bucks for that new replacement battery, and I'd bet that whatever a new battery costs in 2045 will still buy a heck of a lot of gas and maintenince...
"But storage tech will improve and batteries will be able to withstand a bajillion cycles without replacement" Sure, but why would the OEMs put a big battery that's good to 1,000,000mi in a car when they can get away with one that's good to half that, reduce cost, weight, etc
TD;DR, EVs will be cheaper soon the same way cars will all be driving themselves next year.