The true origin of candy canes is hazy, mixing recorded history with a good amount of legend. Hard candy has existed for thousands of years. The expense of sugar made it a rare treat, shared on special occasions and holidays or as a reward for children’s good behavior.
Church records show that in 1670, a choirmaster at Cologne Cathedral in Germany handed out white candy sticks to keep restless children quiet during Christmas services. The sweets took a long time to finish and kept little hands and mouths busy while they weren’t singing. Worried it might seem improper to give candy in church, he added the symbolic crook to recall the shepherds of the Nativity.
Domradio.de is made by the archdiocese Cologne. They don’t know about such church records and they write:
As beautiful as the story is, it is also unlikely. In the 17th century, nativity plays were forbidden in churches. There is also no written evidence of the story anywhere. However, there is evidence of a church connection. In 1957, Gregory Keller applied for a patent in the USA for the first industrial machine for making candy canes. And Keller was a Catholic priest.
(Translated by DeepL)
Nicely found! Thanks