I used to fight with housing rattle on a customers touring bike, tried the heat shrink trick and it still drove me nuts. Then a guy in the shop told me to brush a thin coat of shellac on the cable housings where they touch the frame, let it dry for an hour. I was skeptical, thought it would crack, but it actually grips and stops the vibration dead. Did a 600 mile test ride around Asheville last month and not a peep. Anyone else tried this or do you swear by those little rubber doughnuts?
Shellac is seriously underrated for this, I started doing it after the same frustration with a gravel bike that sounded like a maraca over every rough patch lol. I still use the little rubber doughnuts on the brake lines but for the main shift housings the shellac just does the job better, especially on carbon frames where heat shrink slips. Did a similar long test through the Blue Ridge a few months back and it held up through rain and mud without flaking, which surprised me. Just make sure you wipe the housing clean first with alcohol or it won't bond right, learned that the hard way on my first try.