Firstly, I know that this can be proved by showing the curl of a gradient is $0$. I am not interested in that. I am interested in the validity of using Stokes's theorem. One way that Jackson proves that $\nabla \times E = 0$ is the following:
$$ F = q E $$
$$ W = - \int_A^B F \cdot dl = - q \int_A^B E \cdot dl = q \int_A^B \nabla \phi \cdot dl = q \int_A^B d \phi = q(\phi_B - \phi_A) $$
so $\int_A^B E \cdot dl = -(\phi_B - \phi_A)$ therefore $\oint_A^B E \cdot dl = 0$
Then using Stokes's theorem $\int (\nabla \times E) \cdot \hat{n} da = 0$ which implies $\nabla \times E=0$.
Isn't the last line true only if $\nabla \times E \geq 0$? It seems like Jackson is instantiating $\int f(x) dx = 0 \implies f(x) = 0$, but this isn't guaranteed unless we already know $f(x) \geq 0$.
Jackson is using the fact that closed curve line integrals of conservative vector fields are equal to $0$.
By Stokes' Theorem we have;
$$\int_{S}(\nabla \times F)\cdot dS=\oint_{\partial S}F\cdot ds$$
But for any $F=\nabla\phi$ where $\phi$ is a scalar field, we have;
$$\oint_{\partial S}F\cdot ds=0$$
So by Stokes' theorem it follows, by necessity, that;
$$\int_{S}(\nabla \times F)\cdot dS=0$$
$\textbf{EDIT}:$
If $(\nabla \times F)$ were not equal to zero everywhere in the interior of our closed contour then it would be possible to restrict our open surface to the neighborhood $M \subset S$ in which $|(\nabla \times F)|\geq 0$. This would lead to;
$$\oint_{\partial M}F\cdot dm \not = 0$$
Which is not possible for $F= \nabla\phi$.