The character 宓 exists only in Chinese now. Henshall says 宓 originally referred to temples tightly packed together, rather like teeth in a comb. (By “temples,” he means places of worship, not the sides of one’s head. With combs on my mind, I originally read his “temples” as an anatomical reference!) The roof 宀 lends the sense of a building here—in particular, a temple.
Anyway, if you pack together temples, you can build a barrier to the outside world, creating an otherworldly, quiet, interior place of worship. How about that?! Secrecy and density actually go together!
Then, of course, 密 includes 山 (yama: mountain). When mountains cluster thickly, they again create a barrier. On the interior, that forms a mysterious, impenetrable, secretive domain. Pretty neat!