I'm with Dave, I think only thing it might have hurt or affected would be the decoder itself. It could be OK and as suggested just need a re-set. If you haven't, maybe try reading a CV? If that reads, it might be OK.
BTW I doubt it was "static shock" since you said you placed the engine on a track frog, more likely it was a short circuit. Unlike DC layouts, DCC has a constant 14 volts or so (AC) on the track. If it's only shorted out for a second that usually won't fry the decoder, but if you let it sit there longer it might have wrecked it.
If you are on carpet give the carpet a light spray with Downy fabric softener about once a week to kill the static buildup. Mel Modeling the early to mid 1950s SP in HO scale since 1951My Model Railroad http://melvineperry.blogspot.com/ Bakersfield, California Aging is not for wimps.
You might have better luck getting informed responses if this was posted in the Electronics and DCC section of this Forum.
I would say that I think it is extremely unlikely that the motor was destroyed or even damaged by this "static shock" incident. It MIGHT be that the decoder was. However, I also know that it is often possible to revive what seems to be a dead-duck decoder (DDD) by reverting to factory default settings of the configuration variables (CVs). If that works, and if you programmed anything special you'd then have to start over and do it again, which is why keeping notes on each engine when programming other than the factory settings is a good idea. In any event I would not be too quick to conclude that things were destroyed and need to be replaced.
The NMRA webpages have this discussion which might be helpful
sr201402_dcc.pdf (nmra.org)
https://www.nmra.org/sites/default/files/sr201402_dcc.pdf
Dave Nelson
While placing one of my DCC steam locomotives on the layout, it got a static shock when I accidentedly set it in one of my crossover frogs, and now it is dead. I like to see what I can do to fix it, but I'm not sure what needs replacing. Do I need to replace the motor of my engine, or the motherboard along with the DCC decoder itself? I recently replaced the old board with a new one (Decoder Buddy V5) as well as a new decoder (Soundtraxx ECO-21PNEM), and I'm unsure if it's those components that needs replacing or the motor. Or, if they ALL need replacing.
My locomotive is an old BACHMANN HO SCALE PERE MARQUETTE #1225 BERKSHIRE - DCC ON BOARD, modified with the new motherboard and DCC decoder mentioned above.