A far-infrared observatory such as the {it SPace Infrared telescope for Cosmology and Astrophysics} ({it SPICA}), with its unprecedented spectroscopic sensitivity, would unveil the role of feedback in galaxy evolution during the last $sim10$ Gyr of the Universe ($z=1.5-2$), through the use of far- and mid-infrared molecular and ionic fine structure lines that trace outflowing and infalling gas. Outflowing gas is identified in the far-infrared through P-Cygni line shapes and absorption blueshifted wings in molecular lines with high dipolar moments, and through emission line wings of fine-structure lines of ionized gas. We quantify the detectability of galaxy-scale massive molecular and ionized outflows as a function of redshift in AGN-dominated, starburst-dominated, and main-sequence galaxies, explore the detectability of metal-rich inflows in the local Universe, and describe the most significant synergies with other current and future observatories that will measure feedback in galaxies via complementary tracers at other wavelengths.