I'm still thinking a lot about the pied piper,about who he is and where he comes from and what that story means, what it did mean, what it can mean.
The pied piper seems to be a trickster archetype, he is very often depicted as a
jester figure:

(from
here)

(from
here)
and I wonder if you could follow the thread far enough you would find at the end a depiction of the God Pan, or some other trickster god.
I find it interesting that the Pied piper is so strongly symbolically tied with the trickster but he is not the one, that breaks the rules, that breaks his word. Maybe there's something in there about how being a flexible bendy shape shifter trickster type is more healthy for humans than being a rigid materialist.
I found Krysar, the version in my previous post, deeply, deeply disturbing but also deeply fascinating. I've never seen that version of the story, where everybody gets turned to rats before. I liked the ending, where the piper shapeshifts to nothing and disappears very much
This version is checkoslovakian and was made in 1985 so is obviously very much about the free market versus communism, individual greed versus collectivity. I'm not sure the scenes alluding to the woman's rape and murder were necessary though, not that i have anything against rape depictions in fairy tales, they happen all the time anyway, it just seems an odd choice to insert one into a fairy tale where there wasn't one previously. maybe it was a way of showing how the ultimate conclusion of capitalism is that people become commodities to be used.
The
wikipedia page suggests that one theory is that the pied piper is a metaphor for death, which would fit with it originating with the plague
however wikipedia also suggests
The theory with the broadest support[5] is that the children willingly abandoned their parents and Hamelin in order to become the founders of their own villages during the colonization of Eastern Europe. Several European villages and cities founded around this time have been suggested as the result of their efforts as settlers. This claim is supported by corresponding place names in both the region around Hamelin and the eastern colonies where names such as Querhameln ("mill village Hamelin") exist. Again the Piper is seen as their leader.
this is backed up further on the same page by:
Professor Udolph surmises that the children were actually unemployed youths who had been sucked into the German drive to colonize its new settlements in Eastern Europe. The Pied Piper may never have existed as such, but, says the professor, "There were characters known as Lokator who roamed northern Germany trying to recruit settlers for the East." Some of them were brightly dressed, and all were silver-tongued.
Of course its very possible that the pied piper was several characters and/or several tales that got stitched together over the centuries