Whatever you decide to use(my favorite is marine epoxy resin), take some time to completely remove all the old, crumbling potting compound. Then clean the area well with electronics cleaner to remove any oil that may be there.
Replace the screws with stainless Allen head screws, they'll be much, much easier to remove when the time comes again. Install the switch and test it with the instrument cluster before you install the swingarm. If necessary, that is a good time to clean the internals.