Given two Riemannian manifolds $M,N$, we say that $f:M \to N$ is harmonic if it is a critical point of the Dirichlet energy functional.
More precisely, this means that for every variation $f_t$ of $f$ with variation-field $v:=\frac{\partial f_t}{\partial t}|_{t=0}$ which is compactly supported in the interior of $M$, $\frac{d E(f_t)}{dt}|_{t=0}=0$.
Using the fact that this property of $f$ is equivalent to $f$ being a solution of a certain differential equation, one can deduce the following statement:
Claim: Suppose that for every point $p \in M$, there exist an open neighbourhood of $p$, $U_p\subseteq M$, such that $f|_{U_p}:U_p \to N$ is harmonic. Then $f$ is harmonic as a map $M \to N$.
Question: Is there a way to prove this claim without the passage $$\text{being critical} \to \text{satisfying E-L equation} \to \text{being critical}?$$
In other words, suppose you only know the "critical point definition" (and never heard of Euler-Lagrange equations). Is there a way to see directly that this property is local?
A naive idea is that given an arbitrary variation, we can somehow represent it as a finite number of compositions of "small variations" but I am not sure this makes any sense or really helpful.
For start, I am ready to assume $N=\mathbb{R}^n$ if it makes the problem easier.