Had an investor bought $2,575 of O'Reilly Automotive (ORLY -0.97%) at its initial public offering in 1993, they would have become a millionaire three decades later. This track record alone is enough to catch most investors' attention. But the auto parts retailer has several other compelling factors that should keep it humming along far into the future. That includes top-tier profitability, a robust stock buyback history, and the potential for continued expansion into Canada and Mexico.

For all these reasons, O'Reilly looks like a no-brainer buy in 2024.

O'Reilly's nascent international growth story

With over 6,000 stores and 28 distribution centers across North America, automotive aftermarket parts and services specialist O'Reilly may seem to be past its growth days at first glance. However, while the company's "easier" store count expansion across the United States may be reaching saturation, its expansion plans into Mexico and Canada have only begun.

Although O'Reilly currently only has 48 locations in Mexico, the six distribution centers it has in the country highlight management's longer-term ambitions. Using the U.S. market as an example, we know that each distribution center typically supports around 200 stores. This would give O'Reilly the potential to grow to about 1,000 stores or more in Mexico -- boosting its total store count by nearly 20%.

On top of this potential, the company recently acquired Canada-based Vast-Auto and its 23 stores and two distribution centers in eastern Canada. This acquisition represents O'Reilly's first move into the Great White North and adds another growth option for the company over the long haul.

What makes this store count expansion potential in Mexico and Canada all the more exciting for investors is that O'Reilly has a long track record of successfully reinvesting in its operations.

O'Reilly's best-in-class profitability

O'Reilly boasts an incredible 71% return on invested capital (ROIC), the second-highest among its peers in the Nasdaq-100. A high ROIC like O'Reilly's is vital to investors as it is often a hallmark of long-term outperformance.

This ability to generate outsize returns from the capital it deploys makes O'Reilly a promising stock to own, especially given the massive long-term expansion plans in Mexico and Canada.

ORLY Return on Invested Capital Chart

ORLY Return on Invested Capital data by YCharts

A robust record of stock buybacks

Thanks to this ability to consistently generate outsize returns from its operations, O'Reilly brings in immense free cash flow (FCF) every year, which it uses to benefit shareholders through stock buybacks.

ORLY Free Cash Flow Chart

ORLY Free Cash Flow data by YCharts

O'Reilly has lowered its share count by 44% over the last decade -- or 6% annually -- thanks in part to mostly low interest rates over the last 10 years, which has helped it fund its stock buyback plan.

ORLY Shares Outstanding Chart

ORLY Shares Outstanding data by YCharts

Consistently buying back shares in this manner can provide explosive returns to shareholders. For example, even had the company's net income not grown over this time, O'Reilly would have seen its earnings per share jump by 79% due to the lower shares outstanding figure.

To highlight the power of share repurchases, S&P Global found that a basket of the 100 most buyback-heavy stocks in the S&P 500 would have outperformed the broader index by 5.5 percentage points annually between 1999 and 2019.

A premium business at a fair price

With a price-to-earnings (P/E) ratio of 25, O'Reilly trades at a similar valuation to the S&P 500's P/E of 23. This reasonable price, the company's international growth ambitions, and its historical markers of outperformance combine to make it one of my favorite no-brainer stocks to buy in 2024.

Poised to record its 31st consecutive year of same-store sales growth in its upcoming quarterly earnings report, O'Reilly Automotive is a perfect example of a stock for investors to buy and hold forever.