

Indeed. I remember someone I respected raving that they had their new WinXP computer on for 2 weeks straight without it crashing and being blown away by the new advanced technology.
Teenage me didn’t have any idea that would have been a low bar even in the 1980s.

Hardware isn’t the limitation, its willingness to fight locked down hardware and the power management of android. You might be able use ADB to control it, install termux and then with that, SSH server and then a server of some sort.
In my experience, most phones don’t seem to boot sans battery, so its just a matter of time until the battery goes poof and your system goes down. Some manage it though - you do get a decent amount of hardware for the power consumption.