Personally I used syncthing which doesn't do encryption but also only uses my own devices, so I can keep the data on my machines at all times.
In the past I used seafile which does support encryption (and it's self-hostable): https://www.seafile.com/en/home/
Also includes first-class support for cloud syncing apps.
Transport security and at-rest security is very important (and is the best you can do if you want Dropbox's ability to access your files, e.g., so their servers can show your files in a web interface), but it's not the same sort of thing as end-to-end encryption.
I don't understand why they don't have it even after all these years.
That only supports excluding directories not individual files, and the actual list of exclusions is buried in some local binary config both of which are moderate annoyances - perhaps those are your qualms?