Experiments were performed at the Fermilab Accelerator Science and Technology facility to elucidate the effects of long-range wakefields in TESLA-type superconducting rf cavities. In particular, we investigated the higher-order modes (HOMs) generated in the eight, nine-cell cavities of a cryomodule (CM) due to off-axis steering with correctors located ∼4 m upstream of the CM. We have observed correlated submacropulse centroid slews of a few hundred microns and centroid oscillations at ∼2 4 0 kHz in the rf beam-position-monitor data after the CM. The entrance energy into the CM was 25 MeV, and the exit energy was 100 MeV with 1 2 5 pC /bunch and 4 0 0 pC /bunch in 50-bunch pulse trains. These experimental results were evaluated for machine learning training aspects which will be used to inform the commissioning plan for the Linac Coherent Light Source-II injector CM. With an entrance beam energy of <1 MeV in this case (or for ∼6 MeV at the European X-ray Free-electron Laser injector), the HOM-effect mitigation would be particularly critical.