Strong laws for a class of path-dependent stochastic processes with applications