Sears was in that same situation in the late 80s/early 90s. The Brennan Bros who ran the RNC into the ground also ran Sears and Montgomery Ward into the ground.
The board finally got rid of Brennan and brought in Martinez. Martinez and his people set out to be nimble enough to compete. He had the support of most of us at the bottom. But middle management fought for the 1950s business model and sabotaged everything Martinez and a chain of successors tried.
I do not know Walmart middle management. Can Walmart do what Sears had the opportunity to do but could not overcome opposition from within?
Walmart practically invented computer-controlled inventory and JIT deliveries. They aren't the same kind of company as Sears and Monkey-Ward.