Looking at how dash does the dpkg-divert (as suggested by Josh): https://sources.debian.net/src/dash/0.5.8-2.3/debian/dash.preinst/
It appears that this approach might work for both symlinks and real files because it manually handles the creation of the symlink using "cp -d". Francois -- https://fmarier.org/