I consider replacing the brake pad retainer pins normal maintenance. I don't put anything on the exposed part that might collect road dirt/grime, and clean them regularly. Anti-seize on the threads of course.
+1... while I put a slight smear of copper-paste on the exposed areas of those pins for corrosion protection... When the caliper pistons get hard to push back/in, I consider a full overhaul. Often are the 'square-rings' already swollen, dirtied up or even frayed from the corrosion/build-ups on the brake pistons. Also crystals growing in the grooves will drive the rings out, obstruct piston movement. So the calipers get knocked apart (pistons driven out with compressed air), see a soak in car wheel cleaner (only products approved for aluminum) with careful rinse and blowing dry afterwards, mentioned groove cleaned with a dental pick (or a self made tool, cloth hanger wire fits exactly), new rings (lubed with dedicated brake assembly paste), pistons either carefully cleaned or, when already showing signs of pitting, simply replaced. The stoppers will not only work brilliantly afterwards, it also makes the next brake pad replacement oh so easy...