itemproperties arent problem actually, if you look into 1.71, it already established a fix for decrease ability itempropertie merged into form with immunity to ability decrease such as risen lord, it works by removing the immunity itemproperty, adding ability decrease and restoring itemproperty, there has to be delays in order to make it work, but it works and immunity applied after any decreases are in place won't restore abilities back.
The only real problem is spell negative energy protection and UEF, as thats not so easily possible to remove and reapply because you cant determine "remaining spell duration".
So there are three choices that I see:
1) what you yourself thought of, dont apply immunity to ability decrease in these spells, rather in every ability decrease spell check for these two spells and if they are on player dont apply ability decrease at all. The problem here is that its a lot of tedious work, its not a global solution and you will unneccessary modify a half of the spellscripts.
2) use nwnx plugin to get remaining effect duration, then reapplying the uef/negprotection wont be a problem
3) use nwnx plugin to apply effect through immunity (linux idk which plugin) or to temporarily disable immunity (windows - nwnx_funcs)