Open mobile phone but not what you think

So I just had an idea of a better use case for running a fuller Linux OS on a mobile phone. That is to repurposed the device after upgrading.
The idea came to me linked to the shortage of Raspberry Pi’s and I was wondering how hard it would be to take the board from a mobile phone and convert it to something like a Pi / IoT device. A cursory Google has some mobile IoT but mostly running Android. I wonder how much further Linux mobile OSes could get if it did not actually have to be a phone.
Maybe I will try something out on my Pixel 5 one day.

The main difficulty comes from locked boot loaders and the potential to brick the device. One Plus has been doing really well at having unlocked boot loaders, but I still get nervous every time I have to flash it. The A/B slot configuration helps, but still not as easy as just flashing a card and plugging it into a pi.