The best way to avoid shock and electrocution hazards is to not become part of the electrical circuit. That means staying as far away as you can from electrical equipment and systems with exposed live components.
Accidents that involve electricity can be caused by unsafe equipment, installation, environment, or work practices. Forensic incident investigations suggest that injuries and/or fatalities can be caused by faulty insulation, loose connections, defective parts, improper grounding, unguarded live parts, failure to de-energize equipment during repair or inspection, and using improper or unsafe tools.
Whether arc flash or shock/electrocution hazards, electrical incidents can be prevented by using safe work practices such as de-energizing electrical equipment prior to repair or inspection, observing caution when working near energized components, keeping tools and equipment properly maintained, and using insulated tools and proper PPE.