The solution for the music I've arrived at is based on OpenSubsonic.
I'm running gonic (Navidrome works, too, and there are other servers such as the original Subsonic) on my server. I'm using Android, but there's probably a similar iOS app, and the OSS Tempo app. Tempo can stream, but it'll also let you download and cache music locally - including entire playlists. So I have a "Phone" playlist that I add music I want to sync to my phone (my music collection is 84GiB, so I sync only part of it), and occasionally download it. Tempo is smart enough to only download songs it doesn't already have.
This is only 1-way. There's no facility to upload music to the server using OpenSubsonic. Also, caching only downloads; if I remove a song from the playlist, it stays on the phone. It's not a true "sync".
I used to use SyncThing, but maintaining include/exclude lists was far more work.
For SMS, I wrote a program. But it requires two different OSS apps on the phone, and I doubt they exist on iOS, they don't sync messages received when the phone wasn't connected, and while one runs reliably, I have to keep restarting the second (it doesn't persist well). So it's not really a good solution, for many reasons, but I can't bring myself to do mobile development anymore so unless an alternative that does what both SMS to URL Forwarder and RestSMS do all in one app, and include caching unsynced messages, it's not likely to improve. It's enough that I can respond to SMSes from my computer, which is the big thing.