This Register article summarizes the situation better than anything I've seen yet. Goes over all the major alternatives to lithium ion and the magnesium, lithium-sulphur, sodium ion, solid state, etc. etc. We got lithium-ion thru a confluence of economics (Sony's idle thin-film factories converted to battery film manufacture) and chemistry.Battery boffins therefore think that lithium-ion has at least a decade of dominance ahead of it.
"The battery industry is all about cost," says Sam Jaffe of Cairn ERA, a battery research outfit. "And cost is a function of scale: you need big factories and mature supply chains. That's not something you can build overnight. It took lithium-ion 15 years before it went from a highly specialised product to more of a mass-market product. That will be true of any upcoming battery technology: it takes decades."
For solar, the dominant powerhouse is the much safer, longer lasting, deeper cycling, and CHEAPER lithium iron phosphate..
https://www.theregister.com/2020/12/30/beyond_lithium_ion_batteries/