Another good product is Renaissance Micro-Crystalline Wax sold with a cleaner.
I used WD40 on a muzzle loader and put it away for about 20 years, went back to it, there was 0 corrosion.
Brother worked at a factory, suddenly had a batch of parts that couldn't be painted, the paint would run off, searched for the cause, found a can of silicone spray by the shear, operator was spraying the bed to make the material slide over it more easily. Removed can=no problem anymore. Even an acid bath wouldn't remove it from the parts.
Best wishes,