Isn’t the situation of preserving local file modifications covered in the Debian handbook[0]? You simply drop a config for apt to not overwrite files you’ve changed…
/etc/apt/apt.conf.d/local
DPkg::options { "--force-confdef"; "--force-confold"; }
[0] https://debian-handbook.info/browse/wheezy/sect.package-meta...