I own a 5-years old Moto G4 Play running a de-googled Android 7.1. It works just fine, and I can install apps from either the F-droid or the Aurora stores.
To me it makes more sense to continue with this phone, as I can find all the replacement parts I need on AliExpress, rather than investing in a new Librem 5 or a PinePhone. While I appreciate being able to use an open mobile OS, there's the problem of apps, and there's still the hardware problem - it's both more expensive (in the case of the Librem 5 at least) and has the same problem of eventual obsolescence.