As you note, the assumption that $f(x)$ splits into linear factors modulo almost all $\mathfrak p$ implies that the decomposition group at $\mathfrak P$ is trivial
for almost all $\mathfrak P$. (This is standard algebraic number theory,
and presumably Milne expects the reader to realize this without any explanation being necessary.)
With this fact in hand, Milne's claim follows directly from Cebotarev:
Let $G$ be the splitting field of $L$ over $K$.
Cebotarev says that any element of $G$ can be realized as a Frobenius
element (in particular as an element of the decomposition group $G({\mathfrak P})$) for infintely many $\mathfrak P$. But since $G(\mathfrak P)$ is trivial
for all but finitely many $\mathfrak P$, we see that every element of $G$
must be trivial, hence that $G$ is trivial, i.e. that $L = K$, i.e. that $f(x)$ splits over $K$.
(If this is the argument you had in mind, then I'm not sure what you're asking.)
A side remark:
I'm not sure what you mean when you write that the factorization of $f(X)$ does not necessarily give the factorization of a prime $\mathfrak p$. As I mentioned in my answer to this question of yours, if $f(x)$ is any element of $K[x]$,
then we may write $f(x) \in \mathcal O_K[1/a][x]$, for some $a \in \mathcal O_K\setminus \{0\}.$
Choosing $a$ appropriately, we may furthermore assume that the discrminant of $f$ is invertible in $\mathcal O_K[1/a]$, so that for every prime $\mathfrak p$ of $\mathcal O_K[1/a]$, the reduction of $f(x)$ modulo $\mathfrak p$ is separable.
The factorization of any prime $\mathfrak p$ of $\mathcal O_K[1/a]$ in the splitting field $L$ of $f(x)$ then corresponds precisely to the factorization of $f(x)$ modulo $\mathfrak p$.
Of course, the primes of $\mathcal O_K[1/a]$ are precisely the primes of $\mathcal O_K$ which do not divide $a$, and so consist of all but finitely many
prime of $\mathcal O_K$. Thus if one is willing to throw away finitely many primes (which is obviously harmless in the case of e.g. Milne's claim), then one
can just work with the ring $\mathcal O_K[1/a]$ and apply Kummer's lemma in this ring. Everything proceeds just as if $f(x)$ has integral coefficients (and there is no need whatsoever to worry about generators of the ring of integers in either $K$ or $L$; e.g., since the discriminant of $f(x)$ is invertible in $\mathcal O_K[1/a]$, the ring
$\mathcal O_L[1/a]$ is generated by the roots of $f(X)$ over $\mathcal O_K$).