Can Apple delete apps that developers have stopped updating and that no longer work, such as an app that hasn't been updated in five years?
Apple routinely pulls abandoned apps that no longer work from the App Store, but it won't delete them from devices you already own. Those apps just won't be reinstalled when you set up a new device.