This question has been studied extensively for decades. a simple search should provide numerous references to referred articles in journals general (nature, science) and specialized.
And “rare earths” aren’t particularly rare, despite the term.
>>gumby+(OP)
there are also no rare earths in batteries. There are rare earths in computers (the same kinds in regular cars) and in neodymium magnets. lithium is not a rare earth element.