We just went at Easter - so different weather
Hanoi was quite good. Book a food tour with Hanoi Kids. La Siesta hotel was fabulous.
Halong bay was great. We went with Indochina Junk who go to Bai Tu Long bay - much quieter and cleaner than Halong. Recommend them. Food was great too. Not sure how good it would be in poor weather though, we had sun.
Bac Ha was interesting- least touristy place we went - not good in July though.
Ninh Binh was an unexpected hit. Check weather though as it might be a bit miserable in the rain.
Hoi An we stayed at An Bang Beach and did Grab (like uber) trips into town which I would recommend. Aira Boutique has good family rooms and hence lots of families.
There is absolutely loads to do around Hoi An as it’s a tourist epicentre - cooking classes, lantern making, Memories show, Teh Dar show, release a lantern on the river, Marble Mountains, moped tour across Hai Van Pass, Ba Na Hills, An Bang beach, cycling round paddy fields/farms, snorkel trip to Cham islands etc etc. We didn’t do half of this!
Saigon we unexpectedly really liked - we basically did the flash version with shops and fancy coffee places - definitely do a scooter tour here. XO are famous but we did Vespa Adventures who were also great.
In your shoes, going at summer I would spend less time in the N and longer in the middle of the country. I would add Hue, do a scooter tour there. (Great fun riding on back of a vespa and keeps you cool). Maybe consider stopping off at the caves at Phong Nga or making a trip to the hills in Dalat (I believe you can do various outdoor activities there).