I) Many of OP's questions on how the Lagrangian formalism works is already addressed in e.g. this Phys.SE post and links therein. For instance the question about the total time derivative in the EL equations is discussed in my answer.
II) In this answer, we would like to explain mathematically the various definitions in the Lagrangian formalism (of classical mechanics). Let us for simplicity assume that there is no explicit time dependence nor higher time derivatives, i.e. leave these generalizations as an exercise.
Let the manifold $M$ be the configuration/position space. Let there be given a Lagrangian function
$$\tag{1} E~:=~TM~\ni~z:=~(q,v)~ \stackrel{L}{\mapsto}~L(q,v)~\in~ \mathbb{R}.$$
The differential is
$$\tag{2} TE~\stackrel{L_{\ast}\equiv\frac{\partial L}{\partial z}}{\longrightarrow} ~T\mathbb{R}.$$
The corresponding Lagrangian momentum function
$$\tag{3} E~\ni~(q,v)~\stackrel{(\pi_M, p)}{\mapsto}~(q,p(q,v))~\in~T^{\ast}M$$
is given in coordinates as$^1$
$$\tag{4} p~=~\frac{\partial L}{\partial v}.$$
Similarly we have
$$\tag{5} E~\ni~(q,v)~\stackrel{(\pi_M, \frac{\partial L}{\partial q})}{\mapsto}~(q,\frac{\partial L(q,v)}{\partial q})~\in~T^{\ast}M.$$
In eqs. (3) and (5) we have used suitable canonical identifications between the cotangent bundles $T^{\ast}E$ and $T^{\ast}M$.
III) Let
$$\tag{6} I~:=~[t_i,t_f] ~\stackrel{\gamma}{\longrightarrow}~M$$
be a position path/curve. Let
$$\tag{7} I ~\ni~t~ \stackrel{\tilde{\gamma}}{\mapsto}~(\gamma(t),\dot{\gamma}(t))~\in~ E$$
be the corresponding lift to the tangent bundle.
IV) The corresponding pullback
$$\tag{8} I ~\ni~t~\mapsto~(\tilde{\gamma}^{\ast} L)(t)~:=~L\circ\tilde{\gamma}(t)~\in~ \mathbb{R} $$
and
$$\tag{9} I ~\ni~t~\mapsto~(\tilde{\gamma}^{\ast} p)(t)~:=~p\circ \tilde{\gamma}(t) $$
are often in the physics literature also called the Lagrangian and the momentum (of/along the path), respectively.
V) The action functional is
$$\tag{10} C^1(I)~\ni~\gamma~\stackrel{S}{\mapsto} \int_I \!dt ~\tilde{\gamma}^{\ast} L ~\in ~\mathbb{R}. $$
VI) The Euler-Lagrange equations read
$$\tag{11} \frac{d}{dt} p\circ\tilde{\gamma} (t)~=~\frac{\partial L}{\partial q}\circ\tilde{\gamma} (t).$$
--
$^1$ In this answer, we only discuss the Lagrangian formalism. There is a corresponding Hamiltonian formalism, which we do not consider for simplicity. In particular, the Lagrangian momentum function (4) should not be confused with the Hamiltonian momentum, which is an independent variable.