Great to read you traced the problem to a poor earth, though is it the one from the battery to the bulkhead/chassis. or the one from the chassis to the engine/gearbox..? A clean up of the connections may be all that is necessary, Perhaps while you are at it, worthwhile to replace the earth lead you thought looked a bit ropey..?