Early on in my historic re-enacting life, I learned a secret that would serve me well: dental floss is the answer when ordinary thread can't cut it.
I've used it time and again on buttons. They tend to come off my weskits and frock coats after vigorous dancing. Reinforcing the entire garment down the line of decorative buttons keeps them on when a Virginia Reel threatens to take them off. I learned at my very first historic ball buttons were going to taunt me. Since then I've taken proactive measures wherever I could.
Lady Sherri asked me, "Why don't you just use carpet thread?"
I would if I didn't have so much dental floss around after getting freebies from the dentist with each visit. One pack will easily reinforce about two coats' worth of buttons. I also use it to sew down the flaps on my buckled shoes if they curl up. The mint scent isn't a distraction.
Don't ask me to try it in the machine. No, no, no.