By means of infrared spectroscopy, we determine the temperature-doping phase diagram of the Fano effect for the in-plane Fe-As stretching mode in Ba1−xKxFe2As2. The Fano parameter 1=q2, which is a measure of the phonon coupling to the electronic particle-hole continuum, shows a remarkable sensitivity to the magnetic and structural orderings at low temperatures. Most strikingly, at elevated temperatures in the paramagnetic tetragonal state we observe a linear correlation between 1=q2 and the superconducting critical temperature Tc. Based on theoretical calculations and symmetry considerations, we identify the relevant interband transitions that are coupled to the Fe-As mode. In particular, we show that a sizable xy orbital component at the Fermi level is fundamental for the Fano effect and, thus, possibly also for the superconducting pairing.