Fermion scattering in a gravitational background: electroweak corrections and flavour transitions