Have been to Japan many times (and we're going back again on Monday).
In most of Japan, summers are hot, very humid, sticky, "muggy" and pretty uncomfortable. I would think twice, and then think again, before contemplating any mid-summer trip to MOST of Japan. It's just too uncomfortable for me. Spring, Fall or Winter, sure, I'd go any time.
The exception is Japan's large northern island, Hokkaido. Hokkaido in the summer months is lovely. It's where Japanese go to beat the summer heat and humidity. We loved Hokkaido during our summer trip there (June). It's really beautiful. As a Canadian, consider this: I live in Seattle, so have traveled extensively around British Columbia (and Alaska). Hokkaido is Japan's equivalent to BC/Alaska: green, pristine, natural, lovely. Incredible nature (including large stretches of wilderness - like "watch out for bears while hiking" wilderness), great seafood. We did an almost-3 week road trip all around Hokkaido and we could have spent 2 weeks more. You will not run out of things to do/see.
In July, I'd skip Tokyo completely and just fly to Sapporo. If it's your first trip to Japan and you really feel the need to at least see a bit of Tokyo, go there first (but for just a few days) and be prepared for intense heat and humidity (you will want to run from one air conditioned building to another to avoid being outside for more than a few minutes). Hokkaido is where you will want to be.
I'd skip Thailand (we go there often, but it's hot and humid pretty much year 'round). Hokkaido is blissful...sunny and warm enough (actually hot mid day) but is just about perfect for a summer vacation. Hokkaido makes an ideal "summer road trip" destination (just be prepared for wrong-side driving)