AirPods have a reputation for being unrepairable, but one engineer might have an unofficial workaround. Ken Pillonel (of USB-C iPhone fame) has created an open source repair kit for first- and second-generation AirPods models. If you're comfortable cracking open the case, you can perform repairs (such as installing a fresh battery) and get back to business using a 3D-printed replacement part. Moreover, the kit will drag your AirPods into the modern era — it switches the charging port from Lightning to an EU-friendly USB-C connection.
Pillonel is publishing the necessary 3D printing and PCB (circuit board) files on his GitHub repository. He's not sure about selling ready-made repair kits himself, but he's open to the possibility.
This solution clearly isn't for the faint of heart. You'll need access to printing hardware, not to mention some technical know-how. To Pillonel, however, it's worth the effort. In normal use, the AirPods charging case is destined to become e-waste if it either breaks or loses too much battery life. The DIY kit promises to keep your case useful for years to come, and offers connectivity you won't get by ordering a case from Apple.