Since most of your trip will be in the north, Chiang Rai makes the most sense (though it’s not set in stone). It’s doable with 17 days/16 nights, which—if I understood you correctly—won’t include Bangkok. To avoid passing through Chiang Mai multiple times and to cut down on kilometers, I’d suggest this route (number of nights per stop is just a suggestion):
- Ayutthaya: visit and 1 night there, then head back to Bangkok’s Mo Chit bus terminal early the next afternoon to catch...
- ...one of the two overnight buses from Sombat Tour* to Mae Hong Son (they don’t go via Chiang Mai), 1 night on the bus
- Mae Hong Son: 3 nights
- Pai: 3 nights
- Chiang Mai: 4 nights
- Chiang Rai: 3 nights
That leaves one night for a possible overnight bus back to Bangkok, or you can add it to one of the stops above.
This way, the pace won’t be super relaxed, but it won’t feel like a race either.
*
https://www.sombattour.com/en/schedule/Bangkok-Mae%20Hong%20Son%20UpdateIf you go with this itinerary, book the Bangkok–Mae Hong Son bus the day before your departure from Mo Chit (you’ll already be there to catch the minivan to Ayutthaya).
If you’re over 30, you might find Pai’s "youth ghetto" a bit dull. Instead, consider staying in Soppong/Pang Mapha—it’s much quieter (and, dare I say, nicer), way more peaceful, and still on the same route, served by the same minivan company that has a monopoly.
If you end up choosing Kanchanaburi over Chiang Rai, note that there’s one daytime and two overnight buses from Chiang Mai to Kanchanaburi daily.