I managed to mash the pedal thread of an XT crank years ago, fortunately I was working in an aerospace engineering place with a full toolroom. Machined out the damaged thread, cut a new thread in the hole, machined an insert in stainless steel, threaded in and loktited in place, drilled new pedal thread in insert. Was probably stronger as a result as the contact patch between hard steel and soft aluminium was about double what it was originally.
Basically fitted a big custom helicoil 🙂
Might not have been quite so simple had I just been armed with normal garage tools though!
Cheers, Rich