The abundance of UV-bright, compact star-forming galaxies in the early Universe indicates that high-energy (Lyman continuum (LyC); λ < 912 Å) photons from massive stars alone could have re-ionized the intergalactic medium. However, the efficiency with which LyC photons escape these systems—and the relative roles of radiation, stellar winds and supernovae in regulating that escape—remain uncertain. Here, using medium-resolution spectra of six otherwise similar local star-forming galaxies spanning a range of starburst ages, we directly trace the launch of a multiphase galactic wind through individual spectral lines alongside measurements of the LyC escape fraction. We find that LyC escape peaks early (<3 Myr), during a period dominated by intense radiation and strong stellar winds but lacking a fast galactic wind. In more evolved systems (>3 Myr), we detect faster galactic winds of greater equivalent width and dust content. These observations suggest that LyC escape peaks early and is later suppressed by the launch and subsequent mass loading of a supernova-driven wind during the first ~10 Myr of star formation in compact star-forming galaxies.