Potting, casting and encapsulating of electric and electronic devices and components