The claw snaps together so fast it generates an air bubble by causing the cavitation of the water around the claw. The bubbles shoot away from the claw like a bullet. Hence pistol shrimp. I call it bubble bullets, and it takes a large shrimp to generate a bubble big enough to do a lot of damage. Most fish will end up with a small spot on them if hit, as the bubble for a split second is almost as hot as the sun. This can kill fish, but on the smaller types, tigers for example, the bubble is tiny. Think air soft gun for a shrimp that size. Hurts a bit, but not deadly to most fish. Tigers form my experience will use this on gammarid amphipods after light go out and the pods are running around. The bubble bullet will kill those and they become shrimp food.The goby is tiny (like 1.25") and very skittish. I don't think it's the killer. OK I have to ask, what is the snapping claw designed for if it isn't to keep other fish out of its burrow?
As for catching one, I have had to do that. A small bottle trap works well, but the bottle opening needs to flush with the sand or it won’t go in. Bait with a piece of mussel or clam. Another option is lifting the rock up and netting it.