I see that you are restricting to (connected) compact Lie groups. This means that $G$ is a product of a semi-simple group and a central torus. The semi-simple piece decomposes uniquely (up to isomorphism) into a product of normal subgroups and the torus decomposes $T^n=S^1 \times \ldots \times S^1$. Thus

\begin{equation}
G=G_{ss_1}\times\ldots \times G_{ss_k}\times S^1 \times \ldots S^1
\end{equation}

Where the first $k$ terms are semi-simple. If you demand that the factors are indecomposable and that they are Lie subgroups, ie no irrational winding on the torus, then this decomposition is unique. I hope this is what you wanted.

I have also been thinking about the non-compact case. I'm going to sketch my thoughts so we can get some discussion going, but there will be mistakes and it is unfinished. If G is semi-simple or abelian we get the same decomposition as before. Suppose $G$ is not semi-simple or solvable. Levi decomposition does give us something, but the Levi factor $G_{ss}$ is not normal in general, and it might even be non-closed which would probably stop us right here. On the Lie algebra level, we can split off the kernel $\mathfrak{g}_{ss_0}=\text{Ker}(\varphi)$ of the $\mathfrak{g}_{ss}$-representation $\varphi:\mathfrak{g}_{ss}\rightarrow \text{End}(\mathfrak{r})$, where $\mathfrak{r}$ is the solvable radical of $\mathfrak{g}$. $\mathfrak{g}_{ss_0}$ decomposes uniquely as it is semi-simple.

I don't know what to do with the complement to $\mathfrak{g}_{ss_0}$, and describing the unique decomposition directly seems hard. The approach I was considering was to use that $\mathfrak{g}_{ss}$-representations decompose into irreducibles, that an ideal of the radical is necessarily a submodule, and possibly split up $\mathfrak{g}_{ss}$ further by taking the kernels of sub-representations. In the end this didn't seem to help much.