OP is mostly perfect until some later parts.
For the curl operator we have a similar integration by parts formula to the divergence theorem: $ \int_{\Omega}\nabla \cdot (u\nabla v) = \int_{\Omega}(u\Delta v + \nabla u\cdot \nabla v) = \int_{\partial \Omega} u\nabla v\cdot \nu \,dS, $ where $\nu$ is the outward unit normal to the boundary. The curl integration by parts formula is: $ \int_{\Omega}\nabla \cdot (\phi\times \psi) = \int_{\Omega}(\psi\cdot\nabla \times \phi - \phi\cdot \nabla\times \psi) = \int_{\partial \Omega} \phi\times \psi\cdot \nu \,dS = \int_{\partial \Omega} \nu\times \phi\cdot \psi \,dS.\tag{1} $
Say now you wanna minimize (here I use $u$ and $v$ instead of $f$ and $h$): $ \mathcal{G}(v) = \int_{\Omega}|\nabla\times v|^2\,dx, $ if the minimizer is $u$ and the variational limit is also no problem: $ 0= \frac{d}{d\epsilon}\mathcal{G}(u+\epsilon v)\Bigg|_{\epsilon= 0} = 2\int_{\Omega} \nabla \times u\cdot \nabla \times v. $
Now we use formula (1), letting $\phi = \nabla \times u$, and $\psi = v$: $ \int_{\Omega}(v\cdot\nabla \times (\nabla \times u)- \nabla \times u\cdot \nabla\times v) =\left\{\begin{aligned} \int_{\partial \Omega} \big(\nu\times (\nabla \times u)\big)\cdot v\,dS \\ \\ \int_{\partial \Omega} (v\times \nu) \cdot (\nabla \times u)\,dS \end{aligned}\right. $ There are two choices of way of writing boundary terms to be zero:
You can set for the minimizer $\color{blue}{\nu\times (\nabla \times u)|_{\partial \Omega} = 0}$, and only tangential part suffices. $\nabla \times u|_{\partial \Omega = 0}$ is too strong.
You can set for the test function spaces $\color{red}{\nu\times v = 0}$, then $\nu \times u$ can be prescribed as any permissible boundary data $g$ (those who have 0 surface divergence).
Choosing blue, you have to modular a gradient in a proper function space $H$ to set up a well-defined problem: $ \left\{\begin{aligned} \nabla\times (\nabla \times u) &=0 \quad \text{ in } \Omega, \\ \nu \times (\nabla \times u) &= 0\quad \text{ on } \partial \Omega. \end{aligned}\right.\tag{2} $ For $u \in H/\nabla p$ the quotient space, which means we don't tell the difference between $u $ and $u+\nabla p$, above problem has a unique solution. The only solution for (2) is zero, a.k.a. $u = 0$ or say $u = \nabla p$. Once we add a gauge condition $\nabla \cdot u = f$, then (2) is equivalent to the Neumann problem for $p$: $ \left\{\begin{aligned} \Delta p &= f \quad \text{ in } \Omega, \\ \nabla p\cdot \nu &= 0\quad \text{ on } \partial \Omega. \end{aligned}\right. $
Choosing red, the problem is: $ \left\{\begin{aligned} \nabla\times (\nabla \times u) &=0 \quad \text{ in } \Omega, \\ \nu \times u &= g\quad \text{ on } \partial \Omega. \end{aligned}\right.\tag{3} $ Again this problem has a unique solution in $H/\nabla p$, except this time $p$ is constant on the boundary which implies $\nabla p\times \nu =0$. If we set $g$ to be 0, then above problem again has a zero solution, which means $u = \nabla p$. Now a gauge condition $\nabla \cdot u = f$, then (3) can be transformed to a Dirichlet boundary problem for $p$: $ \left\{\begin{aligned} \Delta p &= f \quad \text{ in } \Omega, \\ p &= \mathrm{Constant}\quad \text{ on } \partial \Omega. \end{aligned}\right. $
Summary: the minimizer $u = \mathrm{arg}\min\mathcal{G}(v)$ is a gradient field $\nabla p$, the boundary condition of $p$ relies on the boundary condition of $u$. Both problem (2) and (3) don't require the normal component of $\nabla \times u$ or $u$ to be imposed. If you prescribe $\nabla\times u = 0$ on the boundary, which implies $\nabla\times u\cdot \nu = 0$, the problem may be over-determined.