HH is a comedy, no doubt about that. But good comedy needs to match the story and setting, and the setting of HH is not an easy one to put comedy in. HH material keeps giving signs that HH is going to shed light on current issues of today, poverty, homelessness, exploitation, corruption, lgbt expression, sexism, trust, depression, etc. It seems that demons are portrayed as the downtrodden of the immortal plane, and even the richest demons could pale in comparison to the poorest angel.
All of these demands drama and quiet moments of reflection, emotion, happiness, sorrow, anger, hope, etc. And heroes trying to do all in their power to help demons see the light in themselves. So comedy needed for this setting and story needs to be precise and clever, and not prone to defaulting to vulgar South Park like comedy. It also needs to be in the correct amount. Use it too little, the show becomes too depressing, use it too much, and you neglect the the times when you need to be serious. In other words, the comedy needs discipline and focus.
How would you write the comedy? Me personally, I'd take inspiration from the follwoing.
The stories of Charles Dickens, who was a master of showing that even in dark places and times, hope can be found. So the writing could be praised as Dickensian.
Power Rangers RPM, which was set in a post apocalyptic future ruled by robots who want to kill humanity, and the last refuge for humanity is a domed city that's heavily implied to be run by the military, and organized crime is a necessary evil(Pretty hard core for a kid's show isn't it?) and it didn't shy away from how cynical and hard life is, but it found ways to include comedy and make the audience and characters want to keep going, and in my opinion it did it better then Avatar The Last Airbender.
Samurai Jack, which decided to swap between action, drama, and comedy per episode. Some episodes were very dramatic, others were fun and silly, and some were quite serious and full of action, even scares.
Wakko's Wish, the first and only Animaniacs movie, this movie is known for not just having the usual hliarious and brilliant humor from the entire cast, ut also surprisingly good amounts of drama. And the setting demands drama. Because the setting is not the Warner Brothers studio. It's a poor downtrodden and starving town called Acme Falls, part of the Kingdom of Warnerstock until it was taken over by the Kingdom of Ticktokia(A reference to when Warner Bros was bought by Time Warner). The new ruler King Salazar rules with an iron fist and taxes the hell out of everyone until everyone is broke except him.
Acme Falls is now a poor and starving town, and the Warners are Orphans who live on the street. Yes you read right, Orphans. Seeing them like that instead of zany cartoon characters is pretty gut wrenching despite the comedy they still pull off. Despite still pulling one liners, Yakko is forced to become an early parent and has something that he never really had on TV, responsibility. Especially on the fact that Dot has been given the ill child trope. Yes, Dot, is given the same treatment as Ushio in Clannad after story. Throughout the entire movie, despite the fact she still pulls of many of her "Cute" jokes, she is coughing, and moving in a way that gives of the indication that her health is not in good shape. And Wakko becomes the hopeful one. In fact there are actually no Gookie or eating jokes from him. He's played mostly for drama, and it's done REALLY well. Sounds similar to the setting of HH, doesn't it?
What what you do if you were the writer? Think the stuff I've mentioned could be good for inspiration?