Can I pull the file I want out of a .tar? Using 7zip or Root Explorer even?
Yes you can. (Get individual files out of an Odin tarball)
In addition to getting the file back in place, make sure to set its ownership and permission modes correctly, and also inspect (ls -Z) and possibly reset the SElinux extended attributes (chcon, resetcon). Using Win-doze for unpacking tarballs will drop those attributes, increasing the odds you will get something wrong if you don't pay attention. There may also be file locking issues if you try this stuff during a full boot (instead of via safestrap recovery)
As you are finding out, OTAs are meant for 100% stock devices - they are differential patch sets, not full releases.
Worse yet, the diligent file-by-file checks that the OTA performs prior to starting the patching process halts on the first error. So you might have multiple problems beyond the framework file that you are unaware of. (You should be looking in /cache/recovery/*log* after a failed OTA to see what went wrong, BTW)
I haven't seen a detailed description of how the "attribution" processes (that can cause the "Custom" flag to be tripped) work, but there is a chance that only minor changes in the /system mount point could cause the attribution trip... meaning that there is a possibility that you will be able to put everything back & successfully take the OTA... and *still* have "Custom" show up on boot.
good luck