Flatten folder? / Syncthing-Fork run custom script after folder sync completed

I have an iPhone and it syncs to both a server and an Android phone. The Android is set to receive-only, everything works flawlessly. I would like to set up some kind of automation so that the date folders from iOS get flattened only on Android, after being synced, not sure how to do that.

Do the files appear in the synced folder only after they are fully downloaded or does it also appear in a partial way (e.g. like torrents)?

If anyone has ideas on how to set up automatic flattening on a non-rooted Android phone, I’m all ears. If not, perhaps there is a thing that would be possible with Tasker or some other tool which can run a linux command like:

find "$TARGET" -mindepth 2 -type f -exec mv -n "{}" "$TARGET/" \;
find "$TARGET" -mindepth 1 -type d -empty -delete