Detailed balancing in trapping and desorption phenomena in non-equilibrium systems