Given that most old Android phones stop receiving security updates after only a couple years from purchase, you should probably not do anything that involves connecting them to your local network.
And if you don't have or can't afford a Pixel, you can check if your device is supported by my https://divestos.org project. Tested booting on 70+ devices with automated kernel CVE patching and monthly security updates.