Lowest total cost of ownership if you're including fussing around for updates:
Used iPhone, potentially iPhone Pro 11 or iPhone 12. Performance is unmatched, software updates are supplied far longer than for typical android devices.
Larger capacity versions can often be found at almost the same price as base versions if you want to store a lot of data.
Pro versions often have the benefit that their owners were more careful.
But if you're already invested in the android ecosystem and/or looking for lowest prices, that may not be an option for you.
If the thread had been 5 years I think you would be right to pick Apple for lowest TCO including updates. The time period is 3 years however and there are Android smartphones that receive updates for that long so will likely be able to find an Android phone with a lower TCO. It gets a little more complicated if resale value is included in the TCO but I think certain Android phones will come out slightly ahead anyway.
My recommendation also factors in usability over 3 years.
From my experience, Android devices degrade faster in terms of how slow they become; the UX and UI are less responsive and they can't keep up with newer applications.
While I agree that there is an "Apple Tax", the retained performance of iPhones is really surprising, and that's why I feel they make a good value.
Some of my folks have (as some of yours might as well) iPhones 6s and 7 which have been running with absolutely zero issues. Given that the 6s is 6 years old now, I find that very impressive.
The thread looks to mention best "value", and not just lowest TCO. If he wants lowest TCO then Android for sure will win since it occupies the lowest price brackets that Apple doesn't even try to compete in.
I've found LG phones to be good for updates and mostly free of bloat or invasive customizations. I'm actually not looking forward to replacing my current G8 which has great audio/jack, microSDXC, and does everything I need. Had a G6 before that and used it for years until I finally broke the screen. Even future Android changes are becoming questionable, so may need to make the jump to an open platform.
Used iPhone, potentially iPhone Pro 11 or iPhone 12. Performance is unmatched, software updates are supplied far longer than for typical android devices.
Larger capacity versions can often be found at almost the same price as base versions if you want to store a lot of data.
Pro versions often have the benefit that their owners were more careful.
But if you're already invested in the android ecosystem and/or looking for lowest prices, that may not be an option for you.