The iOS limitations are a given, we don’t need to discuss them.
Joplin, as an example, allows syncing via WebDAV. Which you can easily self host.
I know that Joplin works differently. Obsidian also has integrated sync capabilities, but it’s a proprietary protocol and you can’t self host it. And I guess this is a design decision of the authors. To sell their service. They probably need some money to pay their bills.