For the longest time I struggled to find a non-proprietary solution for calendar and contact handling. It seems like it should be fairly straight-forward, since CardDAV and CalDAV are things which exist, but in practice it never worked out. Google and Apple seem to do everything in their power to prevent open solutions from working on their mobile devices, but even GNOME on Linux doesn't have support for stock-standard CardDAV/CalDAV integration in their "Online Accounts" tool. I even tried using Sailfish OS a few times just to prove to myself that it could be done, but although support was there in theory, in practice it was unreliable at best, and at worst completely broken. After several long releases of this not being fixed, I finally gave up.
I have no idea how I managed to miss DAVdroid. If you have your own Nextcloud server, DAVdroid will happily connect to it and sync your contacts and calendar events both ways, and very reliably indeed. It's beautifully simple to configure, and unobtrusive enough that you simply forget it's there. You can install DAVdroid from the open-source Android repository F-Droid, which means you don't need to have a Google account to install it and updates are a breeze.
I have DAVdroid and F-Droid installed on a fairly vanilla install of Lineage OS, and in combination with my own private Nextcloud server, my calendar and contacts are now synced nicely to (and from!) my phone. The F-Droid repository even contains the Nextcloud client, so files can be shared back and forth easily too. On my Linux desktop, Gnome Online Accounts contains a Nextcloud "driver", so everything I mentioned above integrates seamlessly with my desktop too, and in case of emergency everything is accessible via Nextcloud's browser-based interface, which is actually nice enough to use as a daily driver if you wanted to. It's a slick solution.
I'm not sure whether similar options to DAVdroid exist for other mobile platforms, such as OS X or Windows Phone. I'm sure there must be CalDAV/CardDAV connectors available, and I would be interested in finding out how reliable they are. For me, though, the combination of DAVdroid and Nextcloud is the perfect solution to my contact and calendaring needs.