I buy all of my phones second hand on eBay. I used to use Swappa but now that they’re almost entirely populated by reseller listings there’s no longer a reason to use them, you’ll get better prices on eBay from the same people.
I usually just pick a price target (say, $350-390) and buy whatever OEM I feel like using that generation. Most of the time that’s OnePlus, I’ve owned about 5 of their phones and they tend to have very good community LineageOS support.
eBay buyer protection is your friend here, if there’s anything wrong with the phone that’s not disclosed in the listing you’re entitled to a return at the seller’s expense, or you can let them cut you a partial refund to cover the issue - it’s your choice.
If you’re selective about which phone you buy and check the photos carefully you’ll get exactly what you paid for, if there’s anything wrong just send the phone right back.
The only caveat here is battery wear. With modern fast charging pushing 60W+ into a phone you’re looking at 15-20% battery capacity degradation over 18-24mo so expect the phone to hold less of a charge than a new one would and you won’t be disappointed. Battery replacement is a pain, but not terribly expensive. I’ve had several OnePlus phones repaired by their warranty and service center in the US, it’s fairly priced if you’re just replacing a battery.
I’ve purchased maybe a dozen and a half phones and tablets this way over the last decade and never had any issues. Just know what you’re entitled to by buyer protection and have reasonable expectations re: batteries and there’s no real risk to buying used.
Edit: I’ve found that most “open box” and many “refurbished” phones or tablets are just devices someone had buyer’s remorse over, almost all of my tablets were essentially unused and just missing a stylus or something. Phones tend to have some battery wear but if you’re careful about listing photos they shouldn’t actually be damaged.