$500 is still more than twice as expensive as the average price of a new Android phone.
At $200, the 1-2 generations behind used iPhone is very competitive with the slower, cheaper Android phones that you can buy new.
The phones you're comparing the iPhone to are second-tier phones. But, as I said in my original comment, second-tier iPhones are resale, not new.
For instance, my son has one of these and it's a perfectly capable device.
https://www.amazon.com/Moto-PLUS-5th-Generation-Exclusive/dp...