How can I avoid data mangling in filenames when copying files between Linux and macOS?
Use the --iconv option for rsync to specify how filenames are encoded on the local and remote hosts - this might help you in keeping the filenames intact.

When you copy from the Linux server to the Mac add the following to the rsync command:

--iconv=utf-8,utf-8-mac 


When copying from the Mac to the Linux server use the following:

--iconv=utf-8-mac,utf-8 


Note that you need a relatively new version of rsync (>3.0) to have the --iconv option. Apple supplies only an old version so you need to go to another site e.g. a package manager like Macports or Homebrew