Hi,
instead of deleting the custom templates, leave them in place, if they are no longer valid, they will be moved to to a different folder like...
/usr/local/psa/admin/conf/templates/<random>_broken
So just check for that after an update, if present, then recreate your templates.
In my...