Sometimes latest changes get reverted (during sync?)

I haven't read your post in detail yet, but some comments about sync how sync works:

Sync uses files and relies on accurate file timestamps, so ensuring the clocks on the machines at either end is important. If the machines don't have the same time of day, then sync will be given incorrect information to work with, and won't do what it is meant to do.

This can also be affected by the way different machines and filesystems handle file timestamps Eg

Could any of this explain what you're seeing?