Detection of interactions via generalized factorial cumulants in systems in and out of equilibrium