The informant, AH, grew up in a small village in northern Germany and learned this cough remedy from her mother.
Mix crushed onions with brown sugar and let it sit until the juice is pulled out. That resulting juice helps with coughing.
This type of cough remedy seems to be pretty common in northern Germany, as I have heard other onion and brown sugar based cough remedies from people who grew up in different villages in the same area. This form of cough syrup is safe for kids and accessible, which makes it very convenient for rural mothers. I do not know how or why this remedy works, but I do recognize a sweet syrup base as a common form for cough remedies, usually paired with something very sour or bitter.
For reference, this piece of folklore collected is a cough remedy that uses lemon and honey, and contains additional insights about similar sweet syrup + sour or bitter ingredient cough remedies: “Folk Medicine, El Salvador,” Iris Park, USC Digital Folklore Archives, September 10, 2020, http://folklore.usc.edu/folk-medicine-el-salvador/.