Any device that dissipates a few 10s of mW of heat will probably fail if enclosed in epoxy.
You need to place the MOSFET on a metal plate that is exposed to the outside but you also need to find another MOSFET with a lower Rds(on).
1 Like