Some of the old LG phones (the V series) were known and sold for the quality of their audio. If you can find one of those on eBay it should be pretty cheap.
The OG Galaxy S had a dope Wolfson WM8449 DAC in it. I used the Voodoo sound app to get proper drivers on it and it became the best sounding phone I ever had. It drove my 250 ohm Beyerdynamic headphones with ease.
I agree with this. I have one that I have kept for the audio. I loaded a 512 Gb card it it and it is perfect. Now i just need to seriously expand my music collection.
I used to use Mortplayer on Android for years which played FLACs and used folders well. I don't know the current state of the app, but it might be worth looking into.
All the music files had strings of characters added to their file name. All of them. In every folder and subfolder. The names were long, VLC displayed them in marquee.
In that player those changed names didn't show, but un any other player and file manager they did. Which I found out when sicmu started having playback issues and I opened VLC.
That was perhaps the 2nd or 3rd version of it posted on FDroid. I used to search for a folder player a lot and so tried the first version posted there, it was great until that update.
I am not in the US. I don't like to buy second hand smartphone in my country. It is either overpriced or straight up junk, be it in the local equivalent of craiglist or in specialized store. However, It is the solution I would prefer if I can get a spare phone from someone I know (given or bought). But I have not been lucky yet. Most people I know use their phone untill they stop working or there is no sd card.