Hi Francois,
I cycled part of that route a few years ago when I visited the Yuanyang rice terraces: Kunming-Tonghai-Jianshui-Honghe-Yuanyang-Gejiu-Kaiyuan-Mile-Luxi-Shilin and back.
Your plan is certainly doable. And even though it's the rainy season it doesn't mean it will be raining all day. You will see plenty of sunshine between showers and panorama's only get more stunning after the rain has washed the dust away. Roads are getting better too. You'll have some mud on some stretches, but mostly the roads are fine for cycling.
You can rent a decent bike from Xiong Brothers on Beimen Jie; try to get a bike with a rear carrier and put your stuff in 2 panniers; much better than a backpack or a trailer.
There are no decent maps for sale here in Kunming, but I used a local Yunnan atlas (horrible scale and in Chinese) and it did the job also. Any bookstore here sells them.
Only local (provincial) trains will allow you to to take your bike on (after removing the front wheel), but there's plenty of other transportation you can use for difficult or lazy stretches (tractors, trucks, minivans etc.) For security never leave your bicycle outside at night Lock it somewhere in the hotel or take it up to your room. On tripadvisor you can find more info on what to see along the way.
Bon Voyage!