If it wasn't for closed-sourced drivers that block the use of modern Android on them, we could indeed use old phones as local servers, including for AI stuff.
I wouldn't mind some regulation around forcing companies to release old closed code when the phone becomes unmaintained.
Maintain or publish
https://spectrum.ieee.org/smartphone-data-centers