You have a dirty or loose connection somewhere on the battery cable ends. That's my bet anyway. I do give you extra credit for trying to solve an electrical problem with a hammer. That is high end methodology reserved for only the upper echelon mechanics. I fix stubborn carburetors the same way.
Carl