If I'm working just inside one partition, could I move files around? The idea is to refresh an SD card against bit rot, but without moving the files out and in again.
If you have the space, use recursive
rsync to make a second copy in the partition, then delete the first.
If not you could copy each file over itself. The system and ssd should not notice that the data is the same, so should allocate a new block for it. You can use
dd conv=notrunc for this. It has the advantage of preserving hardlinks, and even if interrupted the data should be undamaged. Eg
dd if=myfile of=myfile conv=notrunc
You would want to preserve file attributes. For the modification time, save it first with
touch -r myfile tmp, then restore it after with the reverse
touch -r tmp myfile. There remains directories and symbolic links that won't get refreshed.