I absolutely love hot chocolate made on an espresso machine, even if I only drank black coffee it would be worth having a steam boiler for the choc. (I drink coffee with or without milk, but if milk, then steamed/shot)
You can grate choc into the jug and steam it with the milk just fine, but be sure to purge and wipe the wand well after. You can also use drinking chocolate powder the same way (mix powder with a little hot water and make a paste before you add cold milk to the jug) which is also better than stove top because of the silky texture, although a different taste to real melted chocolate.
Some places (I’m recalling a post by Scotford who runs Federation) make a chocolate ‘sauce’ which they pour into the cup as if it were espresso and then pour the steamed milk on top so you get latte art.
Everyone should have hot chocolate off an espresso machine at least once in their life.