Hi,
If the cable to the hub shoud be ok, there are still severall possibilities. For example my bike (Stöckli ET2) originally had sliding contacts between battery and seattube which made it possible to easily remove the battery but also generated a lot of potential faults (oxidation, contact...