A lot of electronics are potted in epoxy or something similar, true, but things like conformal coatings and/or rubber seals are actually much more common. Industrial equipment often needs to be both repairable and water/dustproof and uses these methods.