Retailers have navigated pandemic closures and supply chain snarls in recent years. But dealing with the fallout from inflation could be an even tougher test.