I've recently started reading about groupoids. I understand that they (higher-groupoids) are useful in the context of speculative theories, like string theory, where we are dealing with branes etc. However groupoids are also valuable in conventional gauge theories like, for example, the standard model. To quote from the book What is a Mathematical Concept?

From […] to the objects of field values for gauge field theory, which need to keep track of gauge equivalences, we find we are treating geometric forms of groupoid. If in the latter case instead we take the simple quotient, the plain set of equivalences classes, which amount to taking gauge symmetries to be redundant, **the physics goes wrong** in some sense, in that we cannot retain a *local* quantum field theory. Furthermore, in the case of gauge equivalence, we do not just have one level of arrows between points or objects, but arrows between arrows and so on, representing equivalences between gauge equivalences.

What's a concrete example to demonstrate this? So far, I've only found very abstract examples that talk about some gauge transformations $g$ and $h$ abstractly.

So what I'm looking for, is an example that is really explicit. For example, let's take a concrete structure group like $U(1)$. Then let's specify some gauge transformations $g(x)= ...$ and $h(x)= ...$, where the dots should be replaced by concrete functions of $x$.

- So how, can we demonstrate concretely that in gauge theories, "
*arrows between arrows"*, i.e. gauge transformations of gauge transformations are also important?
- And how can we see that something goes wrong if we naively factor out local gauge transformations from the description?