When determining whether the couplings in a QFT Lagrangian are relevant/irrelevant/marginal, we set $\hbar = c = 1$ and use the fact that the action is dimensionless to find the dimensions of the field itself. For example, the action for a scalar field might look like $$ S = \int \mathcal{L } d^4 x$$where $$\mathcal{L} = \partial_\mu \phi \partial^\mu \phi -\sum_{n\in \mathbb{N}} \lambda_n \phi^n.$$
Imposing $[S]=0$ then implies that $[\phi]=1$ (where [ ] denotes mass dimension), from which we can determine the dimensions of the $\lambda_n$ and conclude that terms with $n>4$ are irrelevant at low energies.
If we were dealing with classical field theory, where $\hbar$ doesn't appear and can't be set equal to $1$, would the above analysis fail? Or would it still be true that $n>4$ terms would become negligible at low energies?
More generally, if we think of the action as a functional to be minimised (rather than the exponent in the QFT path integral), it would seem that we could artificially give the action any units we like (say by writing "kilograms" or "meters" or "seconds" after whatever we had before). This wouldn't affect any dynamics, since the same fields will minimise the action. So why is it correct to take $[S]=0$? Can we be more precise about the exact logic of the dimensional analysis, perhaps re-wording the standard argument more mathematically, in terms of symmetries under scaling, instead of using dimensions?