Struwwelpeter

The Twelfth Doctor read a book of scary stories to the waifs of the 1814 Frost fair in order to gain their trust. The Doctor was proud of the effect the stories had on the children, and even Bill Potts admitted to being affected by the gruesomeness of the stories. (TV: Thin Ice)

"Don't suck your thumbs while I'm away.

The great tall tailor always comes

To little boys who suck their thumbs.

And ere they dream what he's about

He takes his great sharp scissors out

And cuts their thumbs clean off, and then"

- Twelfth Doctor reads a scary story to children

Behind the scenes
The story that the Twelfth Doctor reads is called The Story of Little Suck-a-Thumb published in Struwwelpeter, a popular book of stories warning children against unadvisable behaviour by presenting gruesome consequences of such behaviour. The title of the book is not stated onscreen, but the book is easily recognisable from the read passage.