I've done it both ways, and I'm torn.
Story-wise, it does seem like something better done after the immediate danger of Corypheus has been dealt with, so that argues for doing it after the main quest.
Gameplay-wise, JoH has some really tough fights in it, and AoE mage abilities really help a lot. Solas is a useful team member to take along for his Rift Mage abilities, especially if your Inquisitor is not a Rift Mage themselves, which may (or may not!) argue for doing it before the final fight with Corypheus (especially on Nightmare). The new gear, crafting materials, and new ability, Aegis of the Rift, that you get are very helpful going forward, so you want to have at least some game time left to get some use out of them, although The Descent and Trespasser will do just as well in that respect. I personally generally do JoH before The Descent, because Aegis of the Rift is extremely helpful there, although The Descent is not nearly as difficult as JoH.
Dialogue-wise, I think it's a wash: Solas does have a couple of interesting things to say in JoH, especially if you've finished the main game on a previous playthrough or played through Trespasser once already (IOW, if you know his secret), and NPCs do comment on the events of the main game if you've finished it, but I don't think either are compelling enough--or numerous enough--that you should base your final decision on dialogue alone.