There's hot glue, and then there's hot glue. The common EVA sticks are only good up to about 50C, but you can get high temp sticks that maintain strength up to 70 or 80C. The latter should be more than adequate for most bodges. Even higher temp range is possible with polyurethane glues, but those don't generally work in your standard glue gun.
For more precise applications, good cyanoacrylate works well. Not those awful little foil tubes sold as "super glue", mind, those are just full of disappointment and frustration. You can get higher quality stuff with nice precise nozzles in a range of viscosity at hobby stores, or of course there are the industrial products form Loctite and the like.