Supermassive black hole (BH) mergers with spin-flips accelerate energetic particles through their relativistic precessing jets, producing high-energy neutrinos and finally gravitational waves (GWs). In star formation, massive stars form in pairs, triplets, and quadruplets, allowing second-generation mergers of the remnants with discrepant spin directions. The GW data support such a scenario. Earlier, we suggested that stellar mass BH mergers (visible in M82) with an associated spin-flip analogously allow the acceleration of energetic particles, with ensuing high-energy neutrinos and high-energy photons, and finally produce GWs. At cosmic distances, only the GWs and the neutrinos remain detectable. In this study, we generalize the argument to starburst and normal galaxies throughout their cosmic evolution and show that these galaxies may dominate over active galactic nuclei (AGN) in the flux of ultra-high-energy particles observed at Earth. All these sources contribute to the cosmic neutrino background, as well as the GW background (they detected lower frequencies). We outline a search strategy to find such episodic sources, which requires including both luminosity and flux density.