The Mezzoloths + Ghouls (Encounter 6) I imagined in another trap room (they are personal guards of the black dragon, assigned to him by the Dragonlord of the north). The set up is a large circular room that gradually slopes in towards the centre. It is magically covered in darkness (heavy obscurement) and concealed pit traps are spread out in it (make them as deadly as you want).
When the PCs enter, the Mezzoloths activate a lever that drops a steel door that seals the room and the PCs inside it. The Mezzoloths drop a cloud kill in the darkened room (the ghouls, ghast and Mezzoloths are immune to poison and all three have blinsight so ignore the traps and fight normally).
Once a cloudkill ends, the other Mezzoloth drops another one!
In between ghoul paralysis + cloud kill, PCs stumbling into traps (note the cloud kill settles inside the pits!), and the magic darkness and heavy obscurement of the cloudkill, this is a pretty deadly room!
If the PCs allied with the Giant in encounter 2, he may warn them about this room (cryptically of course).
If the PCs have time to do so, they can rest after this encounter. The black dragon emissary of the Dragonlord is haughty and confident in his protections. In addition, he's a deadly encounter and the PCs are going to need all the rest they can get before encoutnering him (suggest they rest now if they havent already).
Encounter 7 is the dragon. Its a vast chamber, with pools of acid everywhere. A concealed tunnel (heavily trapped and warded with magic) in the roof that leads to the top of the mountain, and provides him the means of escape if he is pressed. He uses his superioir senses, flight and magic (I suggest counterspell, shield and mirror image as his spells) to crush the party. He is not above landing next to a PC and using the ready action to multiattack (triggered by his wing buffet legendary attack). This lets him [wait for a PC to act] then wing buffet, knock a PC prone, full attack him, and then fly off all at once. He opens battles with a breath weapon [he flies down, catches at least two PCs in the breath as a line, then flies 40' back up] and then his frightful presence. There are giant dragon statues and mammoth stalagmites in the room, which he uses for full cover if needed.
The dragon is hubristic and only flees if clearly outmatched. If it flees, this breaks the magic of the pact. The Dragonlord of the north is most displeased with his servants failure and with the PCs...
Note: This encounter is already super dangerous (depending on the PCs resource use in the preceeding 6 encounters, it could go south very quickly). His breath weapon alone is likely to drop 2-3 PCs on round one. If for some reason your party are dealing with this encounter easily consider adding the following fluff (be advised this makes the encounter deadly+).
'As one of the chosen emissaries of the Dragon lord of the north, the black dragon wears one of the five fabled dragon helms (one exists for each color of chromatic dragon). These artifacts allow a dragon who wears one to assume human form indefinately (his stats do not change in human form, and he retains all his normal abilitites including breath weapon, but loses flight). They also grant resistance to all forms of damage to any true dragon that wears them, and amply the dragons breath weapon making it ignore resistance (and/ or any other abilities you want).'
I only suggest the 'dragon helm' option if your PCs can handle it. It also lets you tie this adventure into an ongoing story arc of the PCs dealing with all 5 dragon emissaries (all who wear a fabled helm) and the dragonlord himself.