These types of charms are some of my favorites. It works on a sympathetic connection between the one working the charm and the “witch” on the other end who, at least in theory, has done some sort of harm that warrants such a response. There are a lot of charms in this genre, most often (at least in Old World variants) it is witched butter or cream that is taken and beaten (sometimes it’s heated in a pan on the fire first). The idea is that the witch that has cursed the cream or butter (or in the case of the charm below has left their influence in the house) is beaten by way of the thing they touched. The sympathetic connection is important in many folk magic workings. Sometimes the connection need only be the cream or butter that was soured, or floor sweepings, or sometimes it’s more personal and may include hair, fingernails, clothing, etc.
Again the number three is used (very common in a lot of folk magic). The color black is of course associated with witchcraft. The use of the elm could be referencing the tree’s association with Saturn which rules over darkness and black magic. That could be a stretch though.
Let the sweepings, which are swept together in a house for three days remain in a heap, and on the third day cover it with a black cloth made of drilling, then take a stick of an elm tree and flog the dirt heap bravely, and the sorceress must assist, or you will batter her to death.
Found in the Albertus Magnus