If you just want a server, you can use an android phone already. Either pick one that works with postmarketOS, or termux could work fine (I don't know the overhead of that though). No point in using an iPhone here.
Assuming they're ok with being kept on 24/7, they could become IoT terminals. A 10 years old phone should still have enough horsepower if it contained the bare minimum to load just one program that speaks to the home network, or a mpd remote to play music in the given room, communicate through VoIP with other terminals, etc.
They could be used also in a lab to show data coming from instrumentation, as secondary display for servers etc. Plenty of uses; the only limitation being represented by the roadblocks (binary blobs, lack of documentation, closed drivers etc.) corporations put in place to prevent any further use of those devices that goes beyond what they have planned.