JWST CEERS probes the role of stellar mass and morphology in obscuring galaxies