The problem is that z[t] and therefore n[t] depend on phi and y, but that dependence is internal and not explicit. E.g. the simplified code, something like which happens at the initial condition when NDSolve starts integrating, If[x[t] == 0, n[t], 2 n[t]] /. t -> 0 /. {x[0] -> 0, y[0] -> 0.0400369, \[CurlyPhi][0] -> 0.41} does not result in a number. The best solution is to rewrite z and n, e.g. z[y_, phi_] := y - l Cos[phi] and similarly for n[y_, phi_] := ...; then use n[y[t], phi[t]] in the equations. Then all the Evaluates are unnecessary, as @m_goldberg suggests in the comments. The quick fix is to put an Evaluate on the nested If:
NDSolve[{m y''[t] == n[t] - m g, \[CurlyPhi]''[φ''[ t] == (n[t]*l*Sin[\[CurlyPhi][t]]n[t]*l*Sin[φ[t]] + m x''[t]*l*Cos[\[CurlyPhi][t]]x''[t]*l*Cos[φ[t]])/i, x''[t] == If[(x[t] - l*\[CurlyPhi][t]l*φ[t] == 0) // Evaluate, l (\[CurlyPhi]''[φ''[ t] Cos[\[CurlyPhi][t]]Cos[φ[t]] - \[CurlyPhi]'[t]^2φ'[t]^2 Sin[\[CurlyPhi][Sin[φ[ t]]) // Evaluate, Evaluate@ If[x[t] - l*\[CurlyPhi][t]l*φ[t] > 0, -\[Mu]k*n[t]μk*n[t]/m // Evaluate, -\[Mu]k*n[t]μk*n[t]/m // Evaluate]], y[0] == l*Cos[0.41], y'[0] == -2.22, \[CurlyPhi][0]φ[0] == 0.41, \[CurlyPhi]'[0]φ'[0] == -50, x[0] == 0, x'[0] == 0, WhenEvent[z[t] == 0 // Evaluate, "StopIntegration"(*;Print[y'[t]]; Print[\[CurlyPhi]'[t]]*Print[φ'[t]]*)]}, {y'[t], y[t], x[t], x'[t], \[CurlyPhi][t]φ[t], \[CurlyPhi]'[t]φ'[t], z[t], n[t], \[CurlyPhi]''[t]φ''[t]}, {t, 0, 0.2}, Method -> {"EquationSimplification" -> "Residual", "DiscontinuityProcessing" -> False}, AccuracyGoal -> Automatic, WorkingPrecision -> MachinePrecision, MaxSteps -> 100000000, PrecisionGoal -> Automatic] Probably such a complicated problem has other issues. Certainly x[t] - l*\[CurlyPhi][t]l*φ[t] == 0 is probably never going to be True due to the discrete nature of numerical integration. It is given a special semantics in WhenEvent[x[t] - l*\[CurlyPhi][t]l*φ[t] == 0,...] but not in If[x[t] - l*\[CurlyPhi][t]l*φ[t] == 0, <one>, <two>]. The If variant is equivalent to simply <two> with a very high probability. So @bob_the_legend's comment concerning refactoring the Ifs with WhenEvent seems worth pursuing.
But to reiterate, I'd say the starting point is to follow good programming practice and make all parameters a function depends on be explicit arguments to the function.