The claim that ‘Dickens invented the scary clown’ seems to be rooted in the work of Andrew McConnel Scott, Professor of English at the University of Buffalo, through his paper ‘Clowns on the Verge of a nervous breakdown: Dickens coulrophobia and the Memoirs of joseph Grimaldi' where
Through a focus on the career of the British pantomimist Joseph Grimaldi (1778–1837) and a reading of his Memoirs (1838), edited posthumously by Charles Dickens, this essay seeks to demonstrate that what we often term coulrophobia (the fear of clowns) has its origins in a narrative of memorializing that takes place in the midst of rapid social change.
Just to set the scene a little, Grimaldi is credited with being the essential creator of clowns as we know them today, including being the originator of whiteface make-up.
Per Wikipedia https://en.wikipedia.org/wiki/J._S._Grimaldi
In the early 1800s, he expanded the role of Clown in the harlequinade that formed part of British pantomimes, notably at the Theatre Royal, Drury Lane and the Sadler's Wells and Covent Garden theatres. He became so dominant on the London comic stage that the harlequinade role of Clown became known as "Joey", and both the nickname and Grimaldi's whiteface make-up design were, and still are, used by other types of clowns.
Dickens was invited to edit and improve an existing ‘clumsily written life of Grimaldi, which had been based on the clown's own notes’, which Dickens did under his regular nom de plume, "Boz".
According to an article on the Smithsonian Magazine website The History and Psychology of Clowns Being Scary https://www.smithsonianmag.com/arts-culture/the-history-and-psychology-of-clowns-being-scary-20394516/
Grimaldi’s real life was anything but comedy—he’d grown up with a tyrant of a stage father; he was prone to bouts of depression; his first wife died during childbirth; his son was an alcoholic clown who’d drank himself to death by age 31; and Grimaldi’s physical gyrations, the leaps and tumbles and violent slapstick that had made him famous, left him in constant pain and prematurely disabled. As Grimaldi himself joked, “I am GRIM ALL DAY, but I make you laugh at night.”
In his essay Stott states:
Dickens shared a suspicion of theatricality with many of his contemporaries, even to the extent of viewing performance as an “inherently destructive endeavor,” in which the ideal of sympathetic imagination so prized by Romantic theater critics was viewed as “antithetical to reason, deliberation and control” by the generation that followed (Woods 144).23 In the case of clowns, this distrust is redoubled by his view of pantomime clowning as not just anachronistic, but also somehow constituting an affront toward the cherished memories of childhood. To this end, Dickens can be considered one of the first artists to substantively represent clowning in terms that were to significantly influence later formulations of coulrophobia.
Referencing the reference to a beggar in clown’s attire in the Pickwick Papers, he goes on to say
In what is certainly the first example of “dark carnival” in English literature, “Stroller’s Tale” portrays the clown as a monstrous contradiction, a ghoul disfigured by the immorality of the man who plays him and who later dies in a fit of terrifying hallucinations that blur fiction with reality. It is the foundational statement of coulrophobia: all humor having fled, the object of spectatorship resents being watched, is unable to differentiate between the play world and the real world, and transposes his personal demons onto the supposed joviality of his mask.
The Smithsonian article, referencing the work of Stott states that he goes ‘so far as to say that Dickens invented the scary clown’
by creating a figure who is literally destroying himself to make his audiences laugh. What Dickens did was to make it difficult to look at a clown without wondering what was going on underneath the make-up: Says Stott, “It becomes impossible to disassociate the character from the actor.” That Dickens’s version of Grimaldi’s memoirs was massively popular meant that this perception, of something dark and troubled masked by humor, would stick.