Not to mention the fact that AOSP-based distributions like LineageOS can be used to keep the Android version on older hardware up to date for a long time after the vendor has given up on it, providing OTA updates to keep the device current. The real limiting factor ends up being the relatively low amount of memory in very old devices (512KB-1GB used to be common around 2010-2011, Android can still run on this hardware in a limited fashion but 1.5GB or more is preferred).