Last Wednesday, I shot with someone who told me his caplock rifle had been loaded with black powder for over two years. I watched him fire the rifle without any problems. He told me he used Bore Butter for patch lube.
Today, the same person told me he cleaned the rifle after he got home and the bore was shiny. He did not see any corrosion anywhere inside the barrel.
The rifle had been kept in his workshop where the humidity ranges from 35% during the winter to 80% during the summer.
It's corrosive after you pull the trigger, not before.
Shoot a gun and let it sit for a year and you'll be buying a new gun or barrel.