 There is a later expression "einen Bocksbeutel anhängen" ("to attach a "Bocksbeutel" [to someone]"), meaning "to make someone an object of ridicule", attested in the 19th-century "Deutsches Wörterbuch".A physical "Bocksbeutel" was indeed used as a practical joke (cf.the "Kick me" prank, cuckold horns and other forms of public humiliation such as "donkey ears"), but a wine bottle is an unlikely object to use for such a purpose.