The approved method to reararrange filesystems
is to dump(8) and restore(8) or equivalent.
Sometimes this is impossible or extremely difficult - think
hosted or other systems without any accessible additional mass storage.
If a shrinkfs(8) and movefs(8) existed, would anybody use them?
shrinkfs would be implemented such that if it were interrupted
at any point fsck would result in an intact filesystem.
The tradeoff of security vs. speed requires that compacting
a large almost-full fs could take a long time.
movefs of a filesystem over itself, if interrupted, could result
in corruption which would require another program to recover
It still would be safer than attempting do this manually.