Using WithMountedFile is always going to be a faster option when you don't need the files in the actual rootfs, so if that works then problem solved, but I am curious why the merge is taking so long. Provided it's not a progress output problem, merge-op is generally very fast since it just hardlinks files rather than copying them.
The only bottlneck is number of files/dirs, but in tests I ran a while back I merged 10k files in ~5 seconds, so I'm curious if that /work dir has a truly enormous number of files, like 30k+? If so, there's some low-hanging fruit for optimizing merge-op more for those cases.
Otherwise, another possibility would be that your dagger engine isn't able to overlayfs for some reason. Is this running against the default engine (the one that starts in docker)? Or is it one of the dagger-in-dagger engines you have been using?