Called in the title an electric shock, this sounds like an arc flash (this is what the spokesperson interviewed said). Questons remain from this short article.
1. Was the tool insulated?
2. Was the worker wearing VR gloves and Protectors?
3. Was the worker wearing adequate AR protection?
4. Had the worker received proper arc flash training & electrical safety training?
Being a railroad, they are excluded from NFPA 70E in many jobs but they do fall under OSHA standards and NESC which have specific requirements.