When asked for an example of a huge company with a very valuable stock, retail giant Walmart (WMT -0.08%) quickly springs to mind as a great example. The big-box retail empire that Sam Walton built has become a symbol of not only the retail industry but also mega-corporations and even the broader economy.

As such, many businesses strive to match or beat Walmart in various ways. For example, every retailer would love to exceed Walmart's market cap of $535 billion -- the largest market footprint in this industry.

And on that note, I have found two retailers that seem likely to attain that goal over the next decade. By 2033, I expect both of these stocks to pass the $535 billion benchmark -- and I wouldn't be surprised if they are worth more than Walmart on an apples-to-apples basis at that point.

They will take very different routes to that ambitious destination, but both are worthy investments with plenty of wealth-building shareholder value.

Costco: A rising retail star

Warehouse retail giant Costco (COST 1.01%) is similar to Walmart in many ways, especially when you compare the company to the Sam's Club operation. Both chains operate bulk-shopping warehouses with low prices, a limited range of brands, and require a paid membership.

The price difference between similar products at Sam's Club and Costco is usually small, but its Kirkland brand of generic goods has a reputation of high quality that the Member's Mark line at Sam's Club can't match. And why not? After all, Kirkland items are often rebadged versions of leading brand-name products, available at a lower price.

This reputation for high-quality generic products gives Costco a competitive edge. Furthermore, its employees generally enjoy higher pay and better benefits than their Sam's Club colleagues. Costco maintains that distinction, even if it undermines the company's financial results during hard times.

And that's the secret sauce in Costco's recipe for success. Happy workers tend to be more enthusiastic about their jobs, leading to higher-quality work and more positive interaction with customers. And it shows in customer experience ratings and financial results. Costco sports a strongly positive net promoter score of 57 (on a scale from -100 to 100), as the vast majority of survey respondents report a positive experience in its stores. Walmart's lower-paid workers deliver a less impressive experience with a net promoter rating of -9. In other words, shoppers tend to look forward to their next Costco trip while going to Walmart (and Sam's Club) feels more like a necessary chore.

As a result, Costco delivers higher revenue growth than Walmart in nearly every quarter. In the most recent reports, for example, Costco showed 9.4% sales growth year over year, while Walmart's top-line growth stopped at 5.7%. If you want a more direct comparison, Sam's Club's net sales fell by 0.1% in the same period.

And that's why I expect Costco to continue catching up to Walmart's gigantic market value years ago -- Costco's market cap of $15.2 billion was just a 6% sliver of Walmart's $257 billion market value. Today, Costco has nearly eclipsed that old benchmark with a $251 billion valuation of its own -- or 58% of Walmart's market cap:

WMT Market Cap Chart

WMT Market Cap data by YCharts.

This trend could easily continue for another decade -- and I'm not so sure that Walmart can stay ahead of this relentless pursuit.

Alibaba: A fallen giant with a solid future

Chinese e-commerce titan Alibaba (BABA 0.59%) is a very different story.

This online retail mogul has already been significantly larger than Walmart in the past. Alibaba had a consistently larger market cap than Walmart between 2016 and 2021. Changing regulations in the Chinese market dragged the stock down at that point, and Alibaba was also slapped with a $2.8 billion fine under Chinese antitrust laws that year. The stock has been struggling to bounce back from that legal setback amid a weak global economy and raging inflation.

In some important ways, Alibaba still puts Walmart in its shadow. For example, the company has been collecting significantly higher free cash flows than its American peer since 2018:

BABA Free Cash Flow Chart

BABA Free Cash Flow data by YCharts.

So Alibaba's stock is trading at 7 times trailing free cash flow right now while Walmart's reading on the same metric is 23. There's a similar gap in terms of after-tax price to earnings projections, and the American company looks downright expensive next to its Chinese sector rival when you base your analysis on book value or price to total cash.

I'll admit that the antitrust action is a cause for concern, especially if Beijing finds new reasons to complain about Alibaba's operations. However, a $2.8 billion fine is just a slap on the wrist for a company generating more than $30 billion of cash profits per year. And the Chinese government is taking dramatic action to stimulate a sluggish economy these days, with potential long-term benefits for local industry giants like Alibaba.

All in all, Alibaba really doesn't have a tall order here. It's just a matter of getting back on its feet after an unfortunate stumble. This stock has been larger than Walmart before and could get back to that position again. Just play by the (ever-changing and sometimes draconian, but also occasionally beneficial) rules, keep an eye out for international expansion ideas, and get back to E-commerce 101.