He certainly did understand the dangers of electricity when he conducted the kite and key experiment.
As a matter of fact, in another of his experiments, he once knocked himself temporarily senseless.
At the time, he was trying to electrocute a turkey and nearly killed two birds with one thunderbolt. Here’s part of his account to a colleague:
“I have lately made an experiment that I desire never to repeat.
Two nights ago, being about to kill a turkey by the shock from two large glass jars, containing as much electrical fire as forty common phials, I inadvertently took the whole through my own arms and body, by receiving the fire from the united top wires with one hand, while the other held a chain connected with the outside of both jars.”
Franklin goes on to physically describe the event and its sensations and effects. He ends with this embarrassed plea:
“You may communicate this to Governor Bowdoin as a caution to him, but do not make it more public, for I am ashamed to have been guilty of so notorious a blunder; a match for that of the Irishman whom my sister told me of, who, to divert his wife, poured the bottle of gun powder on the live coal; or that of the other, who, being about to steal powder, made a hole in the cask with a hot iron.”