I suggest to use
https://f-droid.org/en/packages/com.github.catfriend1.syncth...
and setup the synced folder on the SD Card as a subdirectory of the app data folder. It's worked well with an old phone (until I replace it with one that no SD card but 128+ GB of storage)