So can a phone running Lineage. The thing blocking termux is a config file; any phone that isn't locked down can handle it.
You're not getting all of the openness for free, but you can get a lot of it for free.
For now it's a config. As these things progress and get more locked down with each release in the name of security, it's going to be harder and harder and I don't want to scramble the moment it is practically impossible. I'd rather push for a free, open, libre hardware now so that the polish is there when there's no alternative.
If that actually happens.
I haven't seen any downward trend of LineageOS. I haven't seen any downward trend of Samsung hardware.
I've also noticed that nowdays, few phones are able to run more than one newer major Android version ahead because the OEM will simply not release the firmware needed to run newer versions and Lineage doesn't have the capacity to update/release their own firmware rebased against the latest Android, (I am talking about things such as the radio firmware, OnePlus is a famous example I know of).
A PinePhone/Librem 5 will also always be capable of running emacs/golang etc. which is not easily doable on Android if termux isn't possible anymore.