The company aims to complete the phaseout by 2032, citing changing consumer habits, including a surge in ordering from online apps and drive-throughs.