Fun fact: You can put PostmarketOS on Nokia N900 which is from 2009. It should still make it relatively usable, though probably quite slow. It only has 256MB RAM and a single-core 32-bit 600MHz CPU.
I kept a Samsung Galaxy Tab 2 from 2013 up to date with CyanogenNod until the LineageOS fork. That thing had 768MB of RAM and 8GB of storage and couldn't even fully update to Android 4.4.4 due to lack of storage space, but around Android 7 with custom ROMs was when I felt it simply wasn't worth the effort anymore due to the terrible performance