if you are going to glue down parts that will not get hot, then hot glue works well
epoxy is also a good choice, and it wont melt if the parts get warm
the thing you have to be careful of, if part like that big resistor creates a lot of heat, then you dont want to encapsulate it so the heat cannot dissipate
if you have a board assembly that is subject to vibration, as long as its all low power stuff, and nothing gets hot, you can pot the entire board with epoxy, like a brick.
if you need to do that with hi power parts that will get hot, there is special potting material that is heat conductive , but its expensive.