Consider the PinePhone Pro:
- headphone jack
- no camera bump (well, it does have one, but it is no higher than 1mm, if that, so it lies pretty much flat)
- no gaps in the display (and a pretty impressive screen-to-body ratio considering that fact)
- runs whatever software you like - almost in excess! The SoC bootloader comes unlocked and most users choose to follow that with a Tow-Boot installation to load their ARM operating system of choice
It is not a 'modern Android phone'. You'll probably have difficulty getting Android on it at all, and the processor (at least for the non-pro model I own) was literally designed for use in point-and-shoot cameras, not smartphones, so expect... 'nostalgic' loading times.
It's not practical for all but the most enthusiastic hackers, even on Hacker News, but there is a delight in a multiple-year-old handset getting faster and more reliable as the FOSS community continually introduces refinements to all parts of the software stack.