OK, here are some tips.
If the edges of the slot are buggered and raised (the normal situation) clamp the screw in a vise with the slot in line with the vise jaws. Then take a light hammer and start to tap the raised metal, pounding toward the slot so as to both flatten the raised part and drive it back into the slot. Do this from both directions. Then chuck the screw in a drill or drill press and hold a file on the screw head as the screw turns to reshape the head contour. Finally, with the screw still turning in the drill, use emery paper or cloth to smooth the screw head and polish it appropriately to the gun finish. Then, for a blued gun, use cold blue to blue the screw. Alternatives are heating to get a heat blue or Parkerizing. For stainless steel, usually simply polishing is enough.
Now if you have to recut the slot, here is a way. Instead of buying an expensive file set, buy some cheap hacksaw blades, the finer tooth the better. If you look at the blade you will see that the teeth are offset to the sides, alternating from one to another. You don't want that, so grind the blade flat on the sides to remove that "set". Then grind lightly on the edge of the saw blade to make sure the teeth are flat, not rounded. You now have a screw slot "file" that will cut/restore a screw slot.
The nice thing about this is that those hacksaw blades are cheap and you can grind them to the appropriate width without worrying about cost. Done the way I say, the screw slot will be difficult or impossible to tell from the original, and a buggered screw will look about as good as new.
Now, how to prevent screw buggering. When you have a stubborn screw, use that drill press. Insert a stub driver blade into the chuck and with the gun on padding on the drill press table, bring the blade down into the screw slot. Don't turn on the power! Hold the chuck down or lock it down and just hand work the chuck back and forth and just about any tough screw will come free. The reason screws are buggered is that the screw driver rides up and out of the slot; with the drill press holding it down, it can't do that.
Jim