Myth in the popular sense, that is to say, an urban legend, says sociologist Joel Best, who has been studying the razor-blade-in-the-apple and similar stories for decades.
Halloween sadism is best seen as a contemporary legend (sometimes called an urban legend) (Best and Horiuchi 1985, Grider 1984, Ellis 1994). That is, it is a story that is told as true, even though there may be little or no evidence that the events in the story ever occurred. Contemporary legends are ways we express anxiety. Note that concerns about Halloween tend to be particularly acute in years when some sort of terrible recent crime has heightened public fears.
Worth a read. One root of the legend may be a related tale of nasty people heating pennies in skillets and then tossing them to begging children.