Dollar General (DG -0.41%) is one of the largest retailers in the country. And last month, it hit a major milestone with the opening of its 20,000th store. By comparison, big-box retailer Walmart has more than 10,500 stores, and that's spanning 19 countries. Dollar General's presence is mainly in the U.S., and it has a modest footprint in Mexico as well.

While many companies are scaling back their operations amid a weaker economy, Dollar General continues to focus on growth and expansion. Does the company's relentless pursuit of growth make it a great stock to buy right now, or could there be trouble on the horizon?

What Dollar General's latest numbers say

Dollar General will report its year-end numbers later this month. When it last posted earnings in December, for the period ended Nov. 3, 2023, the business was still generating modest year-over-year growth of 2.4%, with net sales rising to $9.7 billion.

The problem for the business is that same-store sales were down by 1.3% and the company's operating profit fell by 41% to $433.5 million. Dollar General has been battling inventory problems, including "shrink" (inventory lost through theft or damage), which have been weighing on its bottom line. The company has also been criticized and even sued for being chronically understaffed and overworking its employees.

It has been investing into new stores and remodeling existing locations, which could help lead to stronger revenue growth.

Why investors should be worried

There are more than just a few problems with Dollar General's strategy. Simply expanding for the sake of expansion is not necessarily the right approach.

The key number for investors to focus on is the same-store sales growth. That tells investors how much additional revenue was generated by stores that were around 12 months ago. It's more reflective of revenue growth because it excludes recently opened store locations. And that same-store number was negative last quarter.

Another problem is that launching and remodeling stores is capital intensive, which could be a drain on the company's cash. And this comes at a time when borrowing money is expensive as interest rates remain high.

Meanwhile, the company is not generating a boatload of money. Over the trailing 12 months, Dollar General's free cash flow totaled $455.5 million, which is insufficient to even cover the $509.7 million the company paid out in dividends during that stretch.

By spending more on capital projects and store expansion, the company could be spending too aggressively at a time when it might make more sense to scale back, especially in light of staffing issues at its stores.

Is Dollar General stock a good buy?

Dollar General is a top retailer, but investors should be cautious about companies that invest in growth for the sake of growing the top line. What can happen in these situations is that companies scramble afterward to slash costs and reduce their store count once they realize they have spread their operations too thin.

That's what I could see happening with Dollar General as the business' fundamentals are not strong enough where continued expansion makes a lot of sense.

The stock has declined by more than 30% in the past 12 months. But without a more solid plan on improving its bottom line and strengthening free cash flow, this is a risky investment that might only be appropriate for contrarian investors who have a high risk tolerance. Everyone else is likely better off pursuing other growth stocks instead.