Also FYI, the potassium perchlorate leaves a salt residue, which attracts moisture, which causes the barrel to rust. I.e., "corrosive primers" are ones which use potassium perchorate.
A long, long time ago (1930s) fulminate of mercury was used. It wasn't corrosive, but in firing it released mercury vapour, which would embrittle the brass. Didn't matter for shoot-once brass (e.g. military, and most commercial use), but it did matter if you wanted to reload and reuse the brass.