If you rm -fr foo/ where foo/ is a tree of foo/bar/zaz.txt, the remote side's deleting of zaz.txt will tick it's timestamp of foo/bar and so make it think that it's foo/bar are newer than the remote's foo/, and it will re-send mkdir foo/bar back to the remote side.
If you
rm -fr foo/wherefoo/is a tree offoo/bar/zaz.txt, the remote side's deleting ofzaz.txtwill tick it's timestamp offoo/barand so make it think that it'sfoo/barare newer than the remote'sfoo/, and it will re-sendmkdir foo/barback to the remote side.