LineageOS is pretty nice, but it's a bandaid and they dropped a huge amount of older devices from support when they left the CM brand. Hopefully postmarketOS will become more usable in the future, and we'll be able to use that on existing hardware, perhaps in combination with something like Halium when needed to make the proprietary driver blobs usable with a custom, non-AOSP userspace.
The devices they can maintain are constrained by manpower and what they have on hand for testing, but they keep some really old devices going based on popularity. I'm pretty sure the Galaxy S3 still gets the latest. I know the OnePlus One does.