Honestly I would recommend that you get a box that's IP rated and then pot the lid of the box (if its desired for extra reliability).
Unless something is under alot of pressure or needs shock resistance (research this well), potting may degrade the life expectancy due to mechanical issues, (and I mean extra one time shock resistance for artillery and missiles) for instance
http://www.m-coat.com/ICSR%20Paper.pdfhttp://www.circuitinsight.com/pdf/effect_encapsulation_materials_tensile_stress_ipc.pdfAnd repair is really fucking nasty. Based on what I read, I would consider it a bad solution.
Even for shock loads, I would recommend doing as much as you can with 3d printed precision supports for things like capacitors, and liberal use of mounting screws (not just in say, 4 corners). And of course following torque specifications for tightening, and using higher grade bolts and threads to ensure torque stability.
A precision made plastic or metal enclosure that actually mates with the components (well not perfectly, but reducing the amplitude of vibrations that can occur) I think would be better still, but I suspect this would be difficult to engineer.. automotive stuff uses these press fit connections that are more reliable then solder in vibration environments. Problem with machined enclosure might be that the height of the components is minutely different due to the soldering process.
I think also, encapsulants may encourage solder whisker growth in lead free solders, but I am not sure on this, and I would have to find statistics.
Also, I think that a very soft encapsulant may decrease reliability during vibration because it will want to deform and stretch in the middle like a trampoline. I am not sure on this, but it is my mechanical hunch here. If you have difficulty imagining this, then look at a non newtonian fluid on a speaker, or fat man homer simpson running, the lard/starch kinda moves as a group, growing in thickness in the middle and stretching on the edges, with the surface tension holding it together, so this may result in a larger then normal strain force in the middle of a potted PCB. I would recommend adding a screw in the center of mass (probably direct middle) if a soft potting must be used, to prevent bowing. I am not sure if the potting material meets the criteria for this effect. If a enclosure with a strong, tight lid is used, and there is zero air gap in the enclosure, then this could not occur, but it would have to be rigid.
If a flowable material is used, that is still kinda goopy, a leak could make this occur, as there will be extra mass that wants to be displaced under or above the PCB.