The relay does not charge the battery. The other little black box is the rectifier / regulator that is responsible for charging. If you have bad battery cables the thing should not be cranking. Those large cables carry the high current for the starter when you activate the starter relay by pushing the start button. The battery is charged back through the positive cable by the output of the rectifier module after the engine is running. If your elec. box was full of water then most likely one of the connectors is corroded or water has infiltrated one of the other components and ruined it. Clean all connectors to remove any corrosion and use a little dielectric grease when reassembling. If you are lucky this will solve your problems. Several of the previous posts have explained how to tell if the battery is charging.