Physical and theoretical modelling of wax deposition in thermally-driven and sloughing regimes: the effect of the physical and chemical environment