I have included inside a standard 4.6 mail template a hidden view (View Properties) and a monthly scheduled agent "Add "Prohibit Design Refresh" property to folders" that will automatically keep all folders secured from design updates.
To prepare a database before the design is updated. Add both the view and the agent to your mail database in question. Make sure you do not allow for design update to refresh this design.
First open the view to determine if any folders are unprotected. To open the hidden view, open the database with the CTRL and Shift keys pressed. Now look in this (View Properties) view and you will see a list of all the folders and some code to the right. Make sure that there is a capital 'P' is in the text string on the right column. It does not matter wher ethe 'P' appears inline, just that it is present. If the 'P' value is not present, then the agent will actually go through all folders and re-write the field so it includes the 'P' value.
To run the agent manually, go to the Agents view and run the agent from here. Once complete, recheck the (View Properties view and make sure the 'P' is present in all the listings. Now you are safe to upgrade the mail template.
This view and agent can be applied to any database that uses folders and run a risk of them being removed during a template upgrade.
Code
There is too much to include for code, so please send an email to protectfolders@notesguru.net and I will be happy to send a database with only the code in it to you.