Depends a little on the type of glue stick. I am using some industrial grade stuff that did not let me down (yet). Only viable if you have a hot glue gun though.
For permanent mounting (apart from drilling holes) the only other glue I would deem usable is two component epoxy. Of course gluing always requires properly cleaned and prepared surfaces.
+1. If you don't have a glue stick that sticks to FR4 and soldermask, yet, you need to keep looking. There are lots of things that are hard to stick with hot glue, but unfinished wood and soldermask do not fall into that category. Even if it fell off, it is easy to remove and redo. Just brush with alcohol.
There is a huge difference between different brands of glue. I used some Stanley brand sticks that fell off of everything. I think they would be good for making molds, maybe.
I have hot snotted several PCB's in lieu of making proper enclosures and standoffs for decades. One and done. The main point of failure I have come across in electronical things is when gluing certain plastics. There's a bit of an art to it, though. Clean surfaces and preheating where necessary. Many of us will use alcohol and hot air guns for other things in electronical work, anyway. And the hot snot for myriad things including tacking wires and mocking up prototypes. So it would be second nature to reach for the glue gun.
By the looks of whatever OP is making, it might very well be in a junk bin, receiving upgrades or modification, or needing repairs before a good hot snotting initially falls.
Fun fact: the screens on your smart phone are attached to the glass with hot snot.