Should I use SQL Server DMVs with NOLOCK
The "first-quantized setup" is the setup of quantum mechanics, where single particles are considered quantum objects, but fields like the electromagnetic field are still treated classically. However, the derivation of the action in the following is wholly classical (and the first-quantized setup arises when considering $x^\mu$ as quantum fields in the sense of QM as a 0+1 dimensional QFT).
A particle with charge $n$ couples to the gauge field by $n\int_L A$ along its worldline because gauge fields, as a general principle, couple minimally to their four-current $j^\mu$ by $\int j_\mu A^\mu$. The four-current is simply the charge of the particle flowing along the worldline $x^\mu(\tau)$ of the particle, i.e. $j^\mu(y) = n \frac{\partial x^\mu}{\partial \tau}\int \delta(x(\tau) - y)\mathrm{d}\tau$. Inserting this into $\int j^\mu A_\mu$ gives $$ \int j^\mu(y)A_\mu(y)\mathrm{d}^4 y = \int \left(n \frac{\partial x^\mu}{\partial \tau}\int \delta(x(\tau) - y)\mathrm{d}\tau\right)A_\mu(y)\mathrm{d}y$$ and carrying out the $y$-integration yields $$ \int n \frac{\partial x^\mu}{\partial\tau}(\tau)A_\mu(x(\tau))\mathrm{d}\tau$$ and the chain rule yields the claimed expression $$ \int n A_\mu \mathrm{d}x^\mu$$
For your second question, the "sphere at infinity" $S^2$ appears from considering Stokes' theorem $$ \int_\Sigma \mathrm{d}\omega = \int_{\partial\Sigma}\omega$$ and formally writing $\partial\mathbb{R}^n = S^n$. A better consideration would be restricting the integral to a ball of radius R in $\mathbb{R}^n$ and then letting $R$ tend to infinity.