""The connection to Pan, the god is a bit off I think,""""
Might be...but.... this is another link to the chain of Egypt.....
The Greeks identifying Khem with Pan, called this city “Panopolis.” Ham adored it, it is said, whence the name Chammaim given to the pyramids; which in their turn have been vulgarised into our modern noun “chimney.” [ Pneumatologie, iii, 210. This looks more like pious vengeance than philology. The picture, however, seems incomplete, as the author ought to have added to the “chimney” a witch flying out of it on a broomstick.] This statement is entirely wrong. Egypt was the cradle of Chemistry and its birth-place - this is pretty well known by this time. Only Kenrick and others show the root of the word to be chemi or chem, which is not Chem or Ham, but Khem, the Egyptian phallic God of the Mysteries. SD3 42.
Khemstry.... what Isis used to put back Osiris or to get pregnant by .