I don't know if this will work with disc brakes, but with squealing / chattering rim brakes there is a 'magic' cure:
Clean rim and pads. Then spread a tiny amount of motor oil on the rim with your fingertip. Just a few drops.
Do a bit of test braking. At first, you'll hardly get any braking power. After 5-6 attempts, braking power comes back - minus the squeal.