Some of Motorola's mid-range phones are actually pretty good these days - the moto g100 has performance roughly on par with a flagship from a couple of years ago, a huge battery, a microSD slot, a headphones jack, USB-C video output with "Ready For" which is arguably better than Samsung Dex (aside from the name), and official LineageOS support. I got mine for ~$270 on ebay, and if it broke, I'd probably buy the same phone again.
The Sony Xperia 1 IV and 5 IV are also interesting, with many of those same features, but the Snapdragon 8 Gen 1 CPU is hot garbage and Sony didn't provide sufficient cooling (or tuning) to keep it from overheating and thermally throttling after a few minutes of usage.