In Chap. 1 of Atiyah and Hitchin's book "The Geometry and Dynamics of Magnetic Monopoles", the authors mention a "mechanical" argument due to N. Manton. Let $\mathcal{A}$ be the space of all pairs $(A,\phi)$, where $A$ is a connection on a principal $G$ bundle and $\phi$ is a Higgs field. If $\mathcal{G}$ is the group of gauge transformations, then $\mathcal{G}$ acts on $\mathcal{A}$. Denote by $\mathcal{C}$ the quotient space $\mathcal{A}/\mathcal{G}$.
We can represent a tangent vector $\dot{c}$ at a point $c \in \mathcal{C}$ by a tangent vector $(\dot{A}, \dot{\phi})$ at $(A,\phi)$ which is orthogonal to the $\mathcal{G}$ orbit containing $(A,\phi)$. This yields $d^*_A\dot{A} + [\phi,\dot{\phi}] = 0$ (I actually got a different sign for the second term, but I could be wrong. Right now, I am paraphrasing the authors). Then
$$h(\dot{c},\dot{c}) = \int_{\mathbb{R}^3} (\dot{A},\dot{A}) + (\dot{\phi},\dot{\phi})$$
defines (formally) a metric on $\mathcal{C}$. Define a potential energy function on $\mathcal{C}$ by
$$U = \frac{1}{2} \int_{\mathbb{R}^3} (F,F) + (D\phi, D\phi).$$
If we think of a point particle moving on $\mathcal{C}$ with potential $U$, and after interpreting the system in Hamiltonian terms, one arrives at the Yang-Mills-Higgs equations with $\lambda = 0$, namely:
$$d_A^* F + [\phi, d_A \phi] = 0$$ $$d_A^* d_A \phi = 0.$$
Now I will briefly describe my (failed) attempt. The kinetic energy term is $\frac{1}{2}h$ (I think). The momentum corresponding to $A$ is $\partial L/ \partial \dot{A} = \dot{A}$. Similarly the momentum corresponding to $\phi$ is $\dot{\phi}$. We then compute $H$ using a Legendre transform, which then looks like the Lagrangian except with a different sign for the potential term.
Then the equations becomes (in classical notations):
$$\dot{q} = \frac{\partial H}{\partial p}$$ $$\dot{p} = -\frac{\partial H}{\partial q}.$$
I think the previous equations are called the Hamilton-Jacobi equations. The first equation does not tell us something new. The second equation gives us:
$$\ddot{A} = d_A^* F + [\phi, d_A \phi]$$ $$\ddot{\phi} = d_A^* d_A \phi.$$
But what I was supposed to get was the RHSs equal to $0$. Note that I have not yet used the orthogonality condition ($d^*_A\dot{A} + [\phi,\dot{\phi}] = 0$). Am I doing something wrong? Am I missing something?
(By the way, I do not have access to N. Manton's original article, which probably contains the details.)
I basically figured it out. The issue has to do with space vs spacetime. More specifically the Yang-Mills-Higgs equations are defined for fields on spacetime, while the mechanical argument deals with fields on space. I may have a sign mistake in my last two equations having to do with the fact that the potentials in that book may differ from the physics potentials by a minus sign, but anyway, I now understand the issue. I was basically right, in my derivation (not so much in the interpretation of my derivation!).
Essentially, the second order time derivatives that I obtained combine with the second order spatial derivatives to give the full spacetime Yang-Mills-Higgs equations with $\lambda = 0$ (where $\lambda$ is the coefficient in front of the "mexican hat" potential). I will keep this answer, in case it will be useful to other future readers.