In the third quarter of 2019, Warren Buffett's Berkshire Hathaway added a new company to its stock portfolio: luxury-furniture company RH (RH -4.46%). Since then, Berkshire Hathaway has added to its RH position most quarters, most recently in Q1 2022.

RH shares are down more than 50% from their highs because the market is understandably worried about the luxury brand's prospects amid a slowing economy. However, Buffett likes RH stock for good reason. Moreover, CEO Gary Friedman is holding a $2 billion card up his sleeve. And history shows he's not afraid to play it and give shareholders an exciting ride. 

The $2 billion card

RH was once a short-squeeze stock before it was cool. In early 2017, RH stock hit an all-time low of around $25 per share and Friedman was fed up with investors betting against his company. Therefore, with a market capitalization of just $1 billion at the time, the company launched a $300 million share-repurchase plan. And by November 2017, RH stock was up over $100 per share.

History might be repeating itself. With RH stock down more than 50%, Friedman announced a new share repurchase plan on June 2, saying, "We continue to believe our shares are undervalued." The company had $450 million left on its old share repurchase plan. But it's now added an additional $2 billion.

With a market cap of $8.3 billion as of this writing, RH management can repurchase roughly 30% of its shares outstanding -- basically proportionately equaling its repurchase authorization in 2017.

Why RH is a Buffett stock

There's a common thread running through many of the stocks that Buffett buys. Buffett likes stocks with a declining share count because his shares consequently own larger percentages of the underlying business. And Buffett likes stocks where free cash flow (FCF) is going up because profits drive long-term performance.

RH went public nearly 10 years ago. And over that time, the share count is modestly down. Meanwhile, the FCF is dramatically higher. Buffett tends to like both of those favorable traits.

RH Average Diluted Shares Outstanding (Quarterly) Chart

RH Average Diluted Shares Outstanding (Quarterly) data by YCharts.

In 2017, RH's stock repurchase plan worked in the short term because many investors were forced to cover their short positions, sending the stock higher. But over the long term, RH's business performance drove its share-price gains. And that's what interests Buffett most.

Why RH stock might be a contrarian buy right now

What was true in 2017 will be true in 2022 and beyond as well. RH stock might outperform this year as management aggressively buys back shares. But long-term, RH needs to execute on its vision. And the vision is ambitious to say the least.

RH is moving beyond furniture and into adjacent luxury-living categories including yacht charters, hotels, restaurants, private jet charters, and even home services like architectural design and interior design. And by branching out and expanding internationally, RH's management believes it can generate revenue of up to $25 billion annually. For perspective, it had sales of $3.8 billion in 2021. 

The market clearly doubts the plan. Right now, RH stock is trading at one of its most attractive price-to-earnings (P/E) valuations ever -- it was only cheaper during the market crash at the beginning of the COVID-19 pandemic.

RH PE Ratio Chart

RH PE Ratio data by YCharts.

A cheap valuation indicates that the market doubts RH's growth potential. And it also reflects the company's current headwinds. Net revenue was up 11% year over year to $957 million in the first quarter of 2022. But demand is dropping and management expects full-year 2022 revenue to be down between 2% and 5% compared to 2021 due to "the deteriorating macro-economic environment."

It's true that the near term is cloudy. But keep in mind that demand for RH's products is resilient nonetheless. A potential 5% year-over-year drop in 2022 revenue is small and it's still roughly 25% greater than revenue in 2020.

Moreover, RH remains extremely profitable even in this down cycle. For 2022, management expects an adjusted operating margin between 21% and 22% -- far better than its margin of 16.4% in 2020.

In short, even in bad times, RH doesn't look so bad. And its stock is cheap. This may be the perfect setup for a contrarian buy of RH stock.

For a closing consideration, if you buy RH stock today, you're betting on the management team. The company was valued at just $20 million 20 years ago and was almost out of business. Friedman came in with a vision and turned it around. Can the company survive this challenging environment and march steadily toward its $25 billion annual revenue goal? Time will tell. But I wouldn't want to bet against this company and its stellar track record.