If it literally loses ALL power, meaning after a failed start attempt the lights, etc., also don't work, then it has to be poor contact between one or more of the main cables between the batteries and the vehicle. Otherwise proceed as already directed.