We propose an extension of the three-Higgs-doublet model (3HDM), where the Standard Model (SM) particle content is enlarged by the inclusion of two inert $SU(2)$ scalar doublets, two inert electrically neutral gauge singlet scalars, charged vector like fermions and Majorana neutrinos. These additional particles are introduced to generate the SM fermion mass hierarchy from a sequential loop suppression mechanism. In our model the top and exotic fermion masses appear at tree level, whereas the remaining fermions get their masses radiatively. Specifically, bottom, charm, tau and muon masses appear at 1-loop; the masses for the light up, down and strange quarks as well as for the electron at 2-loop and masses for the light active neutrinos at 3-loop. Our model successfully accounts for SM fermion masses and mixings and accommodates the observed Dark Matter relic density, the electron and muon anomalous magnetic moments, as well the constraints arising from charged lepton flavor violating processes. Analyzing the electroweak symmetry breaking, we use a method based on bilinears for the case of three doublets and additional singlets. The proposed model predicts charged lepton flavor violating decays within the reach of forthcoming experiments.