Powder monkeys were boys who would run down the stairs pick up a charge of powder from the hold and carry it up to the guns. Small boys were preferred as they could more easily pass each other in the stairs.
Because of flash and burning embers, it was not permitted to store many charges near the guns.
there were also shot monkeys, but because of the inert nature of shot, more were permitted to be stored by the guns. Some were made of brass, and when it got cold the brass would contract more than the steel shot. When it was really cold the cannon balls could fall off the shrunken monkey, it then being cold enough to freeze the [cannon] balls off a brass monkey.
Good info, thanks.
The song is about hanging a monkey, but the suspicion is that it’s about hanging one of the powder monkey boys.