A plugin rewrote about two hundred notes for me because a template applied on file creation and the sync then created files on the other device, which triggered it again.
Back up first is not boilerplate here. The failure mode is automated, fast, and touches everything, and by the time you notice it has been running for a day.