No easy trains from Chiang Mai to Laos. You would have to go a long way south first.
Try this well received site for some help:
https://www.travelfish.org/transport_detail/thailand/northern_thailand/chiang_mai/chiang_mai/85

Hi all,
I will be in Thailand for about a month and could really do with a SIM with mainly some data. What deals are currently best - cut the chase at the airport for one of the tourist packages or what else is out there? Any networks with better coverage than others?
Oh, and what are experiences with the Chiang Mai flower festival - worth rearranging timing for and necessary to book accomodation?
Thanks!

If it wasn't the rainy season a good route from Bangkok would be Bangkok to Mae Sariang via Tak (excellent scenery from Tak to Mae Sariang in parts) rather than going straight from Bangkok to Chiang Mai . Agree about going to Chiang Dao via Ma Malai from Pai being tricky . Could mean having to wait on the road to flag down mini buses.

There are flights from Mandalay to Chiang Mai, but that would mean a long trip back from Hsipaw and I think the flights are only every other day, not daily!
I was pretty sure Bangkok Airways offers a once daily Mandalay to Chiang Mai flight on an ATR-72, but this may have since changed. www.bangkokair.com will have the details.
Looks like the OP caught this flight.

Mai Chau is deep in a valley surrounded by beautiful green mountain and home to the ethnic minority. I stayed in a homestay in Mai Chau 4D/3N and the December weather is cooler around 18c perfect for hiking and biking. In October the weather can still be warm. My homestay arranged for us to go on a motorbike tour to Pu Luong for $35 which includes 4 hrs ride+2 hrs hiking + lunch. Very few tourists in Mai Chau. I enjoyed my stay there.
More details and photos on https://bigsmallmoment.wordpress.com

Mae Sot and Mae Sai are 600kms apart.
I doubt there is a direct bus from Mae Sot and would hazard a guess you would need to get to Phitsanulok but no first hand knowledge.
A bit off-topic, as the OP was interested in a Mae Sot to Khon Kaen service, which I have established exists, but there is in fact a daily Mae Sot to Mae Sai service too! It's operated by the Green Bus company and passes through Tak, Lampang, Phayao and Chiang Rai. I understand it leaves from either end in the morning, probably around 8am, and arrives in the early evening hours (around 6pm).