I recently contributed a patch to erofs-utils which has now been released with v1.8.3. It introduces a --hard-dereference option that converts hardlinks to separate inodes, similar to the equally-named flag in tar. It can be used to ensure reproducible image builds on systems where similar files from the root FS might be hard-linked against each other for optimization reasons -- like in the Nix store.
https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/commit/?id=54e217b80509c193a087b69a5a52884389236926