Towards Sustainable IoT: Challenges, Solutions, and Future Directions for Device Longevity