Hotmelt glue is poured liberally over many types of electronic circuit
boards in a production environment so, No - it's Ok.
Allow plenty of time for the glue gun to warm up - more than you think is
reasonable - otherwise the glue will not stick properly!
Place a newspaper under the glue gun - it will leak stick to the table when
warm enough!
Whatever you glue must be clean & dry!
Another trick I've learned in spot glueing on PCB's is to prep the
area with a bit of solvent to give it more tack.
I use acetone on a swab. You can also use a bit of fine emery paper to
rough up the glue point.
low temp glue for low stress tacks on things like wires etc...
High temp glue for glueing major items on like battery holders etc...