Let there be a transformation $q(t) \rightarrow Q(s,t)$ such that $L$ remains invariant. There exists an identity point $s_{0}$ where:
\begin{equation}
Q(s_{0},t) = q(t)
\end{equation}
$L$ is initially a functional of $q$, $\dot{q}$ and $t$, but after the transformation it becomes a functional of $Q(s,t)$ and $\dot{Q}(s,t)$. Furthermore, this is the only way that $L$ depends on $s$, so:
\begin{equation}
\frac{d}{ds} L[Q(s,t), \dot{Q}(s,t),t] = \int ds' \, \left \{ \frac{\partial Q(s',t)}{\partial s} \frac{\delta L[Q(s,t), \dot{Q}(s,t),t]}{\delta Q(s',t)} + \frac{\partial \dot{Q}(s',t)}{\partial s} \frac{\delta L[Q(s,t), \dot{Q}(s,t),t]}{\delta \dot{Q}(s',t)} \right \}
\end{equation}
More specifically calculated at the identity point:
\begin{equation}
\frac{dL}{ds} \Bigg |_{s_{0}} = \int ds' \, \left \{ \frac{\partial Q(s',t)}{\partial s} \Bigg | _{s_{0}}\frac{\delta L[Q(s,t), \dot{Q}(s,t),t]}{\delta Q(s',t)} \Bigg|_{Q(s_{0},t)} + \frac{\partial \dot{Q}(s',t)}{\partial s} \Bigg|_{s_{0}}\frac{\delta L[Q(s,t), \dot{Q}(s,t),t]}{\delta \dot{Q}(s',t)} \Bigg|_{\dot{Q}(s_{0},t)} \right \}
\end{equation}
$\dot{Q}(s_{0},t)$ here denotes the function $\dot{Q}(s,t)$ calculated at $s_{0}$, but it is easy to to show that it is also equivalent to the time derivative of $Q(s_{0},t) = q(t)$.
Next, we Taylor expand the Lagrangian around $Q(s_{0},t)$ as such:
\begin{equation}
\begin{split}
L[Q(s,t), \dot{Q}(s,t),t] &= L[Q(s_{0},t), \dot{Q}(s,t),t] + \int ds' \, [Q(s,t)-Q(s_{0},t)] \frac{\delta L[Q(s,t), \dot{Q}(s,t),t]}{\delta Q(s',t)} \Bigg |_{Q(s_{0},t)} \\
&+ \frac{1}{2} \int ds' \int ds'' \, [Q(s,t)-Q(s_{0},t)]^{2} \frac{\delta ^{2} L[Q(s,t), \dot{Q}(s,t),t]}{\delta Q(s',t) \, \delta Q(s'',t)} \Bigg |_{Q(s_{0},t)} + \ldots
\end{split}
\end{equation}
Similarly we may expand around $\dot{Q}(s_{0},t)$ for the first term:
\begin{equation}
\begin{split}
&L[Q(s,t), \dot{Q}(s,t),t] = L[Q(s_{0},t), \dot{Q}(s_{0},t),t] \\
+\int ds' &\, \left \{ [Q(s,t)-Q(s_{0},t)] \frac{\delta L[Q(s,t), \dot{Q}(s,t),t]}{\delta Q(s',t)} \Bigg |_{Q(s_{0},t)} + [\dot{Q}(s,t)-\dot{Q}(s_{0},t)] \frac{\delta L[Q(s,t), \dot{Q}(s,t),t]}{\delta \dot{Q}(s',t)} \Bigg |_{\dot{Q}(s_{0},t)} \right \} \\
+ &\frac{1}{2} \int ds' \int ds'' \, \Bigg \{ [Q(s,t)-Q(s_{0},t)]^{2} \frac{\delta ^{2} L[Q(s,t), \dot{Q}(s,t),t]}{\delta Q(s',t) \, \delta Q(s'',t)} \Bigg |_{Q(s_{0},t)} \\
& \quad \quad \quad \quad \quad \quad + [\dot{Q}(s,t)-\dot{Q}(s_{0},t)]^{2} \frac{\delta ^{2} L[Q(s,t), \dot{Q}(s,t),t]}{\delta \dot{Q}(s',t) \, \delta \dot{Q}(s'',t)} \Bigg |_{\dot{Q}(s_{0},t)} \Bigg \} + \ldots
\end{split}
\end{equation}
Since $Q(s_{0},t) = q(t), \, \dot{Q}(s_{0},t) = \dot{q}(t)$ and the Lagrangian is invariant under the transformation:
\begin{equation}
L[Q(s,t), \dot{Q}(s,t),t] = L[q(t), \dot{q}(t),t] \, , \quad \forall \, s,t
\end{equation}
then the first term of the Taylor expansion is equal to the Lagrangian on the lhs. By extension, the infinite amount of terms from the Taylor expansion(s) must vanish. The two cases which ensure this are $Q(s,t) = Q(s_{0},t), \, \dot{Q}(s,t) = \dot{Q}(s_{0},t)$ i.e. the trivial case in which we transform $q(t)$ into itself, and the case of the 1st order functional derivatives vanishing:
\begin{equation}
\frac{\delta L[Q(s,t),\dot{Q}(s,t),t]}{\delta Q(s',t)} \Bigg |_{Q(s_{0},t)} = \frac{\delta L[Q(s,t),\dot{Q}(s,t),t]}{\delta \dot{Q}(s',t)} \Bigg |_{\dot{Q}(s_{0},t)} = 0
\end{equation}
Discarding the trivial case, by virtue of the third equation we find that indeed:
\begin{equation}
\frac{dL}{ds} \Bigg|_{s_{0}} = 0
\end{equation}
In your case you have $s_{0} = 0$, but it could be anything based on the particular transformation at hand. Hence the choice of $s=0$ for the derivative of the Lagrangian is "intuitive" in the sense that you implicitly need to Taylor expand $L$ around the functions at that specific value. That leads to the $s$-independent term of the expansion to be the same as the Lagrangian before the transformation, leading to the conclusions discussed above.