@pho4cexa I do this with git. I have a git server, but you could use github/gitlab.
For editing on mobile, I use an iOS app called Quine 2 (paid), and git push/pull with an app called Working Copy (free)
Only issue is that I sometimes forget to git push, so my wiki on other devices isn’t up to date. In that case I just decide not to touch it to be safe. Havent tested merge conflict resolution yet out of fear, but switching to a multi-file wiki should mitigate that problem.
Linux geeks doing what Linux geeks do...