The global economy -- as well as Tesla (TSLA 12.06%) CEO Elon Musk's distraction running Twitter -- has sent the fast-growing electric vehicle (EV) market into chaos. With inflation eating into consumer budgets for over a year now, demand for new vehicles is faltering. Then there's turmoil in the largest market for EVs, China. China's economy is reeling as it has brought an end to its zero-COVID-19 policy and is now dealing with record infection rates -- which is translating into feared lower demand for vehicle spending. EV manufacturer stocks have tanked as a result.

Top lithium producer Albemarle (ALB 0.93%) hasn't been spared from the pain either. Up until the final weeks of 2022, the company was weathering the bear market just fine, thanks to soaring lithium prices. But with EV demand now in question for the new year, is Albemarle stock in trouble? 

Slowing demand doesn't mean lower sales

The investor community has been fixated on EV manufacturer stocks for years, and for good reason. Tesla has had an incredible run and has completely turned the legacy auto industry on its head -- and perhaps (eventually) for the better. While making an electrified vehicle takes big up-front technological investment, they could be the key to higher profit margins for legacy automakers later on down the road. 

But instead of investing in EV manufacturers themselves, I've been focused primarily on profitable businesses that help make EVs possible in the first place: semiconductor companies and lithium producers (lithium being the key ingredient in lithium-ion batteries that power an EV). Enter Albemarle.

Albemarle's sales and profitability have been booming, as the company was early to the lithium party. It's now a top producer of the yellowish element with mining, refining, and materials technology sites around the globe. Total sales surged 152% year-over-year in the third quarter of 2022 to $2.09 billion, a function of rapid EV market expansion as well as record lithium pricing. Net income ($897 million in Q3) has swung positive this year as Albemarle's various lithium-producing sites have rapidly ramped up production.  

Speaking of lithium prices, though they have fallen from all-time highs in late 2022, lithium is still sky-high due to too-little supply for the wave of new EV models hitting the market. That isn't expected to change anytime soon as EV models continue to displace legacy internal combustion engines over the next decade. The resulting expense of manufacturing lithium-ion batteries has been one short-term roadblock for many automakers looking to get in on the EV craze. Today, raw lithium pricing is still 10 times higher than it was at the end of 2019.

Thus, though Albemarle has been dragged down as of late by Tesla and worries over China's economy, the company should still enjoy plenty of revenue and profit from its materials production in 2023. 

Are shares a buy right now?

Albemarle is a well-established producer of lithium, and it has been investing in research and development to keep advancing the use of lithium in battery technology. I believe that will give Albemarle a leg up against a lot of upstart competitors trying to cash in on soaring lithium prices.  

Nevertheless, if the economy goes into recession in 2023 and auto sales suffer, Albemarle's profitability could waver from where it is today. After all, though it signs long-term supply contracts with partners, some of those contracts have variable pricing based on lithium market prices. Contract renewals also come up, and manufacturers are looking for ways to reduce the cost of EVs.

After the recent decline, Albemarle stock looks like it has a recession at least partially baked into its valuation right now. Shares currently trade for less than 17 trailing-12-month earnings per share, and management's rosy guidance for the final quarter of 2022 pushes that ratio down to just under 11 times expected 2022 earnings per share (at the midpoint of guidance).

In other words, Albemarle's profit margins act as a sizable buffer against a weak market for 2023 -- if, in fact, EVs do take a step back in the coming year. Additionally, Albemarle's balance sheet is also top-notch. The company had $1.38 billion in cash and equivalents and $1.16 billion in longer-term investments at the end of September 2022, offset by debt of $3.12 billion. Ample liquidity is another positive differentiating factor for this global mining operation.  

To be clear, all mining stocks are incredibly volatile, and I think Albemarle could be in for some wild price action again this year. But after a big collapse in share price in the final month of 2022, I'll consider nibbling on this top lithium producer again, with the intent to hold for the long term.