Is it safe to use hot glue in electronics?
Hot-melt glue won't cause problems directly, but it also has no static-dissipative properties (good insulator), so it won't prevent problems, either.

It's great for sticking things down when building prototypes, but I certainly wouldn't use it in any sort of production environment &mdash; there are far better choices.

You probably do want to make some effort to keep it off the pins of your devices anyway, because if you subsequently need to (re)solder those pins, the high temperature of the soldering iron will either melt or break down the glue, creating a bit of a mess.