While artificial intelligence (AI) stocks have taken center stage now, retail stocks have been the reliable ones in times of economic uncertainty. Costco Wholesale (COST) and Walmart (WMT) are two of the world's largest retailers, both generating billions in annual sales while rewarding shareholders with consistent dividends. But only one company stands out as the stronger long-term investment.