Once you get the rotted wood sorted you should coat the inside of the tailight cutout with something.
For ours I coated the inside with Flex Seal--the only thing I've ever used that product for LOL.
So far so good. I recently replaced the taillight assemblies with LED ones which gave me the opportunity to see how the FS has held up for about 3 years. It looked as good as new...