I only buy phones with great support for LineageOS [0], which is basically the open source version of Android with some adaptations... Even if I bought a 2024 phone, I would install LineageOS to make sure there are no backdoors on my phone.
I always felt that we basically "lost" with open source: Intel did the Management Engine and phones stuck everything in the baseband.
There's no real possibility of having fully software-hackable hardware. Someone else ultimately has control of all hardware, if they want to exercise that control.