Most of my plug and socket connections only maintain their factory integrity for a year or two. Then, a little moisture seeps in, some oxygen atoms start hanging out with some of the metal atoms in the pins and sockets, and corrosion sets in like a bad tax. All of a sudden, my electricity doesn't seem to go as far as it used to.
My solution is to start with clean components and then keep moisture (and salt if you are on the coast) out of the tiny open space inside each plug-and-socket connection. Cleaning the metal pins and sockets is as easy as spraying them with a quality contact cleaner and then either shaking out the excess liquid and letting them air dry or blowing them dry with low-pressure compressed air. I have used the same spray can of Radio Shack contact cleaner for years with great success.
Always choose a cleaner that is safe for plastics. Even if the plugs and sockets are mostly metal, they usually contain at least some plastic parts that could be damaged by cleaners that are not plastic-friendly. I also confine the spray to just the plugs and sockets and am extremely careful not to let it touch my displays. I don't want to find out the hard way that the label, "safe for most plastics" is not a guarantee against discoloring the coated lenses over my LCD screens.
I prefer a chemical spray to mechanical cleaning methods involving sanding or scraping because the spray doesn't remove any metal. Each time you remove corrosion with those mechanical methods, you remove a tiny amount of surface metal along with it. The metal loss loosens the contact between pins and sockets over time, and can eventually cause the bad connections you are trying to prevent.
Starting with brand-new or freshly cleaned metal contacts, I apply dielectric grease (available at auto supply stores) to the insides of my plugs and sockets. My goal is to seal a connection so well that air, moisture and salt can't get into it to cause trouble.
How much grease I use and where I put it depends on whether I consider a connection permanent or temporary. I consider the connections on flush-mounted electronics, "black box" accessories and network tees and hubs to be permanent because they will not be disturbed unless repairs are needed or equipment is replaced. I coat the plug's O-ring or flat gasket with dielectric grease, and then smear more grease all over the inside of the plug. I also place a liberal glob in the socket, hopefully adding enough grease to completely fill the space inside the connection. Then, after I slowly press the plug into the socket and secure it with its locking ring, there will be no open space for air, water or salt to creep into if they somehow manage to get past the gasket, no matter how long the connection remains closed.
I remove my sonar and GPS navigation units for trailering and for safe storage between trips. Obviously, I have to disconnect the plugs from the sockets often, so I consider these connections temporary. I still apply a liberal coating of dielectric grease to the gaskets in the plugs to keep out moisture while out on the water, but I wipe only a thin coating over the open ends of the tiny metal sockets in each plug's face.
Having a layer of grease on exposed plugs attracts dirt, grit and other stuff you would rather keep out of your connections, so between outings I cover the disconnected plugs with thin plastic sandwich bags held in place by tightly wrapped rubber bands to keep them clean. Some crud eventually finds its way past the plastic onto the grease, and I clean the plugs and start over when that happens. I transport and store my units in padded carrying bags so I don't apply any grease to the units' sockets because it would make a mess.
So I protect my temporary connections with a 2-part routine. I wipe the plugs and sockets down with a clean rag each time I remove the units and cover the plugs with plastic. Then, just before I install them again, I inspect the plugs and add grease to each plug's gasket and the open ends of its tiny embedded sockets if necessary.
Am I being ridiculously over-protective about my plug-in connections? Maybe so, but I haven't had a single bad connection issue with them since I adopted this excessive-compulsive behavior. It works for me, and I recommend it.