Mega has file versioning, so if you have a situation like that, you can usually recover the file without much trouble.
Of all the sync solutions I’ve seen, WebDAV is #1 with me and Mega is #2.
I use Linux, Win10, and Android.
I use WebDAV hosted on my Synology NAS, and then on Android, user FolderSync to keep the synchronization happening (even when Obsidian is closed), and on Linux, have just mounted the WebDAV point, and similarly for Windows, I use the directory directly.
For extra safety, though, I also have Mega running on my Win10 box (since it’s almost always on) and it sync’s my entire Vault (dot files included), just so I have a version-controlled backup offsite, in case disaster strikes.