For static electricity to produce heat, there must be a resistance to it freely passing thru a material.
Carbon and graphite which is a form of carbon both conduct electricity quite nicely without providing any significant electrical resistance.
Given a choice, electricity will always pass around the outside surface of a conductor or in our case, a granule of black powder.
So, if a high voltage charge of electricity hits a pile of black powder it will freely pass thru the outside layer of charcoal or graphite from granule to granule without producing any heat to ignite the powder. That is why static electricity will not cause the black powder to explode.
As for the graphite, it is not added to the black powder to protect it from moisture or humidity.
According to Bill Knight, (Mad Monk), the graphite is added to the corned black powder to facilitate screening it.
Also the "g" used with in the Fg, FFg, FFFg, or FFFFg indicates the powder has been "glazed".
"Glazing" is the process of tumbling the powder to knock off the small sharp corners left from the corning process. It leaves the granules much smoother so it will pour easily thru the packing machines and thru your black powder horn or flask.