For older hardware you might as well keep it, the trade-in price is nowhere near enough to be worth it, especially if the device is fully functional.
Last year I got an iPad Air 5. I had - and have - no intention of selling my 9.7-inch iPad Pro, but for curiosity’s sake, I checked my model’s trade-in price. It was $45. Apple, I’m not giving you my iPad for four times that, let alone $45.
If it is fully functional, I’d just keep it. For the iPhone X Apple offers $120. Fine, better than $45, but if it works, I’d keep it anyway.