Apple offer a replacement battery service for any of their current devices. Third party repairers often cover obsolete devices. So it is possible to keep your old devices running. All lithium batteries have a finite number of full charge discharge cycles, usually between 500 and 1000, before they need replacing.
In the event that a device cannot be repaired, Apple normally offer a discount against your old device on the price of a new replacement. Since that usually represents three years or more of intensive daily use and technology is constantly improving, these discounts and upgrade plans can be very cost effective.
Experience has shown that Apple devices function and are supported for longer than those from other manufacturers. You can buy cheap or buy Apple, depending on your needs.