Plot Devices.
I've made that claim before, and I'll be making it again. People seem to think they don't exist, or that they shouldn't exist in certain movies... when in point of fact, they exist in every movie. Plot devices have even invaded so-called Reality Television.
Let me make a few points on this specific scene. It begins at 45:00 in the movie when Holmes begins to pick the lock to the workshop/laboratory, and Watson kicks the door in. They enter, and Watson notices the bear trap on the floor and trips it...
Why is this detail important? Because we see the floorboards, emphasis on boards. IE The floor is made of Wood. Just a few moments past, their location in the building is further emphasized with Holmes walking past a skylight...
So we know they are on a wooden floor, at least one floor off the ground. This fact is confirmed when Dredger exists the workshop via a loading window...
Now, during the fight, Dredger has Holmes on his back, on a table. He has his hand around Holmes' throat. This is at 49:32 in the movie.
Holmes subsequently touches Dredger in the chest with the device in question.
At which point Dredger flies back, punching through a wall in the process.
You are asking about the logistics of this? There aren't any. You can't address an issue of grounding, because neither Dredger nor Holmes were grounded when Holmes touched Dredger with the device. No, no one can claim that since he was standing on wooden floorboards that he was grounded, because then Holmes would be grounded while on the wooden table that is on the same wooden floor that Dredger is supposedly grounded through. If wood will ground for ONE character, it would have to ground for BOTH characters... if we are applying any logic here.
You also bring up an excellent point, and you make it VERY clear in the Youtube video in the comments... that the electricity SHOULD have been conveyed to Holmes as well, since he was clearly being held by the throat when he shocked Dredger. And... people conduct electricity quite well.
I'm not going to even touch the later scene with the device and the pipe.
So, why wasn't Holmes shocked when he first touched Dredger with the device? The screenwriters didn't want him to be shocked. Why did that device work like some kind of antique Tazer? Because the screenwriters wanted it to. Where is the logic that should clearly be present in a Sherlock Holmes movie? It isn't there, because these are plot devices intended to raise the emotional response of the audience. You are expected to watch and enjoy, and not apply the whole that would never happen attitude. Mind you, I'm not saying that this scene had any right to expect such responses, for when you have holes big enough to drive dump trucks full of gold bars through, suspension of disbelief goes out the 31st floor window. However... it's a Robert Downy Jr. movie, and it's a Sherlock Holmes action flick. I'm not sure we have a right to expect anything more than we got.