In this article https://mathstrek.blog/2015/03/02/idempotents-and-decomposition/, there is the following theorem:
Theorem. Let $R$ be any ring. There is a bijection between:
(1) an isomorphism $R \cong R_1 \times \ldots \times R_n$ as a product of rings;
(2) a decomposition $R = I_1 \oplus \ldots \oplus I_n$ as a direct sum of (two-sided) ideals;
(3) an expression $1 =e_1 + \ldots + e_n$ as a sum of orthogonal central idempotents.
The article proves the correspondence between the 2nd and 3rd collections, but not between the 1st and 2nd ("left as an exercise"). However, I don't know how to do it. I know in Artin-Wedderburn, one can go from $R = N_1 \oplus \ldots \oplus N_r$ to $R$ being the product of some matrix rings $R_i = \text{End}_R(N_i)$, so perhaps this will go between (2) and (1).
However
(a) I don't seem to recall using that $N_i$ is a 2-sided ideal;
(b) as far as I can tell the Artin-Wedderburn argument really depends on semisimplicity, whereas $R$ here is just assumed to be a ring;
and (c) I assume one can go from $R \simeq R_1\times \ldots \times R_n$ to 2-sided ideals $I_i$ by taking the "copy" of $R_i$ in $R$ to be $I_i$, but I'm not sure if this is the "inverse operation" to the Artin-Wedderburn endomorphism ring trick I discussed above.