I believe that all these results are applications of the so called First Fundamental Theorem (FFT) of Invariant Theory of $G$, where $G$ is a specific group, which in your case is either $\mathrm{GL}_n$, $O(n)$, $U(n)$ or $S_n$ that your question is about. It's important to note that the FFT is not one theorem but the name for a class of theorems that are supposed to characterize the polynomial invariants of (finite dimensional) representations of the group $G$. Of course, each group is slightly different so the precise statement of the FFT and its proof are individual to each group. (Incidentally, once a set of generators for the invariants are known, a putative Second Fundamental Theorem would give the non-trivial relations between these generators).
It so happens that for the groups you are interested in, any finite dimensional representation is a direct sum of pieces that can be embedded in a tensor power of one (or a small number of) fundamental representations. For $\mathrm{GL}_n$ it is the $n$-dimensional vector representation $V_n$ and its dual $V_n^*$. For $O(n)$ it is just the restriction of $V_n$ ($V^*_n$ and $V_n$ become isomorphic). For $U(n)$ it is again $V_n$ and whichever of the complex conjugates and duals of $V_n$ are allowed and independent over your base field. For $S_n$ it is again just $V_n$. The representation that you are specifically interested in seems to be the adjoint representation on $W = \mathrm{End}(V_n) \cong V_n \otimes V_n^*$.
An invariant polynomial in $K[W]^G$ decomposes into invariant homogeneous summands. Any invariant homogeneous polynomial of degree $k$ is by definition an invariant element of $(W^*)^{\otimes k}$. By the preceding discussion to classify all such invariants, it is sufficients to classify the invariant elements of arbitrary tensor powers of the fundamental representation $V_n$ (and as needed $V_n^*$, ...). In each of these above cases, the FFT states that there exists a finite number of invariant tensors $(I_j)$, each belonging to some tensor power of the fundamental reprsenations, such that any invariant element of an arbitrary tensor product of the fundamental representation is a linear combination of outer products of a number of the $I_j$, up to (allowed) permutations (of copies of $V_n$, ...) and compositions (some copy of $V_n$ with some copy of $V_n^*$).
The result that you stated for $\mathrm{GL}_n$, $O(n)$ and $U(n)$ is a consequence of the fact that the only invariant tensor needed to generate all the invariants (up to products, permutations and compositions) is just $\mathrm{id} \in V_n \otimes V_n^*$. What distinguishes the cases is which of the fundamental representations ($V_n$, its dual and complex conjugates) happen to be isomorphic (thus allowing more permutations among tensor factors).
Finally, getting to the case of $S_n$ that you are interested in:
The FFT for $S_n$ states that the only invariant tensors needed are $I_1 = (1,1,\cdots,1) \in V_n$, $I_2 = (\delta_{ij}) \in V_n^{\otimes 2}$ and $I_3 = (\delta_{ijk}) \in V_n^{\otimes 3}$, where $\delta_{ij}$ is the Kronecker delta ($\delta_{ii} = 1$ and $\delta_{ij} = 0$ when $i\ne j$), and $\delta_{iii} = 1$ with $\delta_{ijk} = 0$ if any of the $i$, $j$, and $k$ are different. Actually, you can have higher order diagonals $I_k = (\delta_{i_1\cdots i_k}) \in V_n^k$ for any $k$, but they can be generated by the compositions/contractions $\delta_{ijkl} = \sum_a \delta_{ija} \delta_{akl}$, $\delta_{ijklm} = \sum_a \delta_{ija} \delta_{aklm}$, ... .
I believe that (at least the formulation of) the FFT for $\mathrm{GL}_n$, $O(n)$, $U(n)$ is credited to Weyl (cf. the reference to his Classical Groups (1939) in the Wiki link). AFAIK, the FFT for $S_n$ came only much later and is due to Jones in the oddly titled
Jones, V. F. R., The Potts model and the symmetric group, Araki, Huzihiro (ed.) et al., Subfactors. Proceedings of the Taniguchi symposium on operator algebras, Kyuzeso, Japan, July 6-10, 1993. Singapore: World Scientific. 259-267 (1994). ZBL0938.20505.
Perhaps if you unwind the above result for $S_n$ you will recover what's stated in Male's article. But their description was too dense for me to recognize the result immediately. They do have a paper of Jones in the bibliography: Planar Algebras, I arXiv:math/9909027, which doesn't directly cite his own 1994 article, but it does cover some similar territory I think.
Edit: It seems that a version of the FFT for $S_n$ was actually known much earlier. Namely, it follows by combining the Fundamental Theorem (Sec.3) in
Littlewood, D. E., On invariant theory under restricted groups, Philos. Trans. Roy. Soc. London, Ser. A 239, 387-417 (1944). ZBL0060.04403.
with Theorem VII in
Littlewood, D. E., Products and plethysms of characters with orthogonal, symplectic and symmetric groups, Can. J. Math. 10, 17-32 (1958). ZBL0079.03604.
Although I'm not certain how complete Littlewood's proofs would be considered by modern experts.