The nonequilibrium Fokker-Planck dynamics in an arbitrary force field f[over ⃗](x[over ⃗]) in dimension N is revisited via the correspondence with the non-Hermitian quantum mechanics in a real scalar potential V(x[over ⃗]) and in a purely imaginary vector potential [-iA[over ⃗](x[over ⃗])] of real amplitude A[over ⃗](x[over ⃗]). The relevant parameters of irreversibility are then the N(N-1)/2 magnetic matrix elements B_{nm}(x[over ⃗])=-B_{mn}(x[over ⃗])=∂_{n}A_{m}(x[over ⃗])-∂_{m}A_{n}(x[over ⃗]), while it is enlightening to explore the corresponding gauge transformations of the vector potential A[over ⃗](x[over ⃗]). This quantum interpretation is even more fruitful to study the statistics of all the time-additive observables of the stochastic trajectories, since their generating functions correspond to the same quantum problem with additional scalar and/or vector potentials. Our main conclusion is that the analysis of their large deviations properties and the construction of the corresponding Doob conditioned processes can be drastically simplified via the choice of an appropriate gauge for each purpose. This general framework is then applied to the special time-additive observables of Ornstein-Uhlenbeck trajectories in dimension N, whose generating functions correspond to quantum propagators involving quadratic scalar potentials and linear vector potentials, i.e., to quantum harmonic oscillators in constant magnetic matrices. As simple illustrative example, we finally focus on the Brownian gyrator in dimension N=2 to compute the large deviations properties of the entropy production of its stochastic trajectories and to construct the corresponding conditioned processes having a given value of the entropy production per unit time.