Endomorphism Rings of finite length Modules are semiprimary It is a “well known” fact that an endomorphism ring $E = \mathrm{End}_R(M)$ is semiprimary (i.e. $E/\mathrm{rad}(E)$ is semisimple, and $\mathrm{rad}(E)$ is nilpotent), if $M$ is a right module of finite length over some ring $R$. However, all I could find out about that result on the internet is that it is well known - no proof, not even a reference.
Now I am curious to see a proof. Here is an attempt, which already shows half of the statement:

As $M$ decomposes into a direct sum of finitely many indecomposable modules of finite length, there is a decomposition $1_E = e_1 + \dots + e_n$ of the unit element of $E$ into a sum of mutual orthogonal local idempotents (just take the projections onto the summands of $M$). The theory of idempotents shows that local idempotents become left- (and also right-) irreducible after modding out the Jacobson radical $J = \mathrm{rad}(E)$. So $\overline{1_E} = \overline{e_1} + \dots + \overline{e_n} \in E/J$ is a sum of mutual orthogonal left irreducible idempotents, which shows that $E/J$ is semisimple.
It remains to show that $J$ is nilpotent. A possible attempt could be to consider the descending sequence of $R$-modules
  $$ M \supseteq JM \supseteq J^2 M \supseteq \dots, $$
  which must eventually become stationary since $M$ has finite length. If Nakayama's Lemma could be applied then we could conclude $J^m M = 0$ for $m \geq \mathrm{len}(M)$, and hence $J^m = 0$. This however leaves us to show that $M$ is finitely generated as a left $E$-module. But I am not sure if this is even true...

I hope somebody can help out at that point. Thank you in advance!

Edit 1: According to this article, the nilpotency of $J$ can be shown by looking at the Loewy series of $M$. That is the series
$$ 0 = M_0 \leq M_1 \leq M_2 \leq \dots \leq M, $$
defined by $M_{i+1}/M_i = \mathrm{soc}(M/M_i)$. Actually, as $M$ is a $E$-$R$-bimodule, there are two Loewy series of $M$ (regarding to the left module and to the right module). The article does not say which one is meant, but in each case, all $M_i$ are $E$-$R$-bimodules as well. To prove nilpotency of $J$, it suffices to show two things:


*

*$J^{k_i} M_{i+1} \subseteq M_i$ for some $k_i$

*$M_n = M$ for some $n$


Now, depending on which Loewy series we choose, one item is very easy to show, but the other one is unclear to me:
If we choose the Loewy series of $M$ with respect to $R$, then, as $M/M_i$ has finite length, each $M/M_i$ contains a simple submodule, and hence a nontrivial socle. So $M_n = M$ for all $n \geq \mathrm{len}(M)$, and (2) holds.
If, on the other hand, we choose the Loewy series of $M$ with respect to $E$, then any $M_{i+1}/M_i$ is a semisimple $E$-module, so $J(M_{i+1}/M_i) = 0$, and hence $J M_{i+1} \subseteq M_i$. So (1) holds.
Any hint about the remaining item is very appreciated.

Edit 2:
I thought I had a solution, but there was a mistake, so I deleted my answer. However, at least I realized that $J$ is a nil-ideal. Maybe that helps somehow...
Proof:

Let $f \in J$. By Fitting's Lemma, there is a decomposition $M = U \oplus V$ into $f$-invariant $R$-submodules such that $f$ is nilpotent on $U$, and an automorphism on $V$. Since $E$ is the full endomorphism ring of $M$, there is a $g \in E$ such that $(1-gf)V = 0$. Since $f \in J$, it follows $V = 0$, and $f$ is nilpotent. Hence, $J$ is a nil-ideal.


Edit 3:
The whole problem appears in [Lam - A First Course in Noncommutative Rings] as an exercise. However, it is said that the nilpotency of $J$ is “deeper”, and it can be reduced to the fact that a nil (multiplicative) subsemigroup of a semisimple ring is nilpotent. Here is how far I got:

Claim: Let $M$ be a $E$-$R$-bimodule such that $M$ has finite length $n = l_R(M)$ over $R$, and $E$ has a nil Jacobson radical $J$. Then $J^n M = 0$.
Proof:
  Induction on $l_R(M)$:
  Let $S$ be the socle of $M$ as an $R$-module. If $M$ is nontrivial, then $S$ is nontrivial as well. If $S$ is a proper submodule of $M$ then we can apply the induction hypothesis to $S$ and $M/S$ (which are both $E$-$R$-bimodules). We get $J^{l_R(M/S)}M \subseteq S$ and $J^{l_R(S)}S = 0$, thus $J^{l_R(M)} M = J^{l_R(S)}J^{l_R(M/S)}M = 0$.
So it remains the case, where $S=M$, i.e. where $M$ is semisimple. We have a natural ring homomorphism $\varphi \colon E \to \mathrm{End}_R(M)$, where the latter ring is semisimple. So $\varphi(J)$ is a nil subsemigroup of a semisimple ring, which must be nilpotent with nilpotency degree $\leq n = l_R(M)$ (according to Lam). It follows $J^n M = \varphi(J^n) M = 0$. $\square$

At this point I am still struggling with the nilpotency of nil subsemigroups, but I certainly get closer to a complete proof! :-)
As previously, any help is highly appreciated! In particular, I would be happy about an elegant proof of the remaining statement which avoids Artin-Wedderburn-Theory and the reduction to matrix rings (which is certainly possible).
 A: Added later: 
Forget the reduction to linear algebra! There is a short and elementary proof which directly shows the original statement. It appears as an exercise in Bourbaki's “Éléments de mathématique” (Algèbre, chapitres 8, ex. 2). Here is my vague translation:

Claim: Let $M$ be a right $R$-module of finite length $n$, and let $\mathcal{F} \subset \mathrm{End}_R(M)$ be a nonempty set of nilpotent endomorphisms which is closed under multiplication (e.g. the Jacobson radical in the above setting). Then $\mathcal{F}^n = 0$, meaning that the composition of any $n$ endomorphisms of $\mathcal{F}$ is zero.
Proof: As in my proof given below, we argue by induction on the length of $M$ to construct a composition series of $M$
  $$ 0 = M_0 < \dots < M_n = M, $$
  such that $\mathcal{F} M_{i+1} \subseteq M_i$ for all $i$.
   If $\mathcal{F} = 0$ there is nothing to show. Otherwise, we have $l(M) \geq 2$, and it suffices to prove the existence of a proper $\mathcal{F}$-invariant submodule $0 \lneq N \lneq M$.
Let $0 \neq f \in \mathcal{F}$ such that $fM$ has minimum length among all nonzero elements of $\mathcal{F}$. It can be shown in the same way as below (see the lemma) that $fgf = 0$ for all $g \in \mathcal{F}$. If $\mathcal{F}f = 0$ then we are done by setting $N=fM$. If $\mathcal{F}f \neq 0$ we set $$N = \sum_{g \in \mathcal{F}} gfM.$$ This is a nontrivial $\mathcal{F}$-invariant submodule of $M$. By construction, we have $fN = \sum_{g \in \mathcal{F}} fgfM = 0$, so $N$ must be proper. $\square$


Original Answer:
Finally, I think I've found a proof. To begin with, note that the original problem appears in Lam's ”first course in noncommutative rings” as an exercise (3.24). Lam suggests to reduce the nilpotency statement to the problem, whether any (multiplicative) nil subsemigroup of a semisimple ring is nilpotent. I already explained how the reduction works in Edit 2 and Edit 3. Afterwards, using the Artin-Wedderburn structure theory, it is easy to reduce further to a linear algebra problem over division rings. In the end it remains to show the following:

Claim: Let $V$ be an $n$-dimensional vector space over a division ring $D$, and let $\mathcal{F} \subset \mathrm{End}_D(V)$ be a nonempty set of nilpotent endomorphisms which is closed under multiplication. Then $\mathcal{F}^n = 0$, meaning that the composition of any $n$ endomorphisms of $\mathcal{F}$ is zero.
Proof: It suffices to show that $\mathcal{F}$ is triangularizable, i.e. there are subspaces
  $$ 0 = V_0 \leq V_1 \leq \dots \leq V_n = V, $$
  such that $\mathcal{F}V_{i+1} \subseteq V_i$ for all $i$. If $\mathcal{F}$ consists only of the zero endomorphism, there is nothing to show. If $\mathcal{F}$ is nontrivial (which already implies $n \geq 2$) we prove the existence of a proper $\mathcal{F}$-invariant subspace $0 \lneq W \lneq V$. Everything else follows by induction by considering $W$ and $V/W$.
Let $r \in \mathbb{Z}$ be the minimum rank of a nonzero element of $\mathcal{F}$. We define
  $$ \mathcal{F}_0 = \{ f \in \mathcal{F} : \mathrm{rank}(f) \leq r \}. $$
  $\mathcal{F}_0$ is a left ideal of $\mathcal{F}$ in the sense that $\mathcal{F} \cdot \mathcal{F}_0 \subseteq \mathcal{F}_0$. For that reason, the (nontrivial) abelian group $W$ spanned by $\mathcal{F}_0 V$ is an $\mathcal{F}$-invariant subspace of $V$. We claim that $W$ is a proper subspace of $V$. But first we need a lemma:
Lemma: Let $f \in \mathcal{F}_0$, $g \in \mathcal{F}$. Then $f^2 = fgf = 0$.
Proof: Of course there is nothing to show if $f=0$, so let $f \neq 0$. Since $f$ is nilpotent, we have $\mathrm{rank}(f^2) < \mathrm{rank}(f) = r$, so $f^2 = 0$. Suppose $fgf \neq 0$. Then $r \leq \mathrm{rank}(fgf) \leq \mathrm{rank}(f) = r$. A dimension argument shows that $fg$ restricts to an automorphism of $\mathrm{Im}(f)$ which is impossible, since $fg$ is nilpotent. $\square$
Proof of $W < V$: Suppose $W = V$. Let $\{f_1, \dots, f_m\} \subseteq \mathcal{F}_0$ be a minimal set such that
   $$V = \mathrm{Im}(f_1) + \dots + \mathrm{Im}(f_m).$$
  Because of the lemma, we may assume without loss of generality that $f_1f_i = 0$ for all $i$: If $f_1f_i \neq 0$ for some $i$, we can simply replace $f_1$ by $f_1f_i$, and the image won't change. The lemma guarantees that this process terminates after finitely many steps, as it ensures that any product of elements of $\mathcal{F}_0$ with repeatedly occurring factors is zero. Now by multiplying both sides of the equation by $f_1$ from left, we arrive at the follwing contradiction:
  $$ \mathrm{Im}(f_1) = f_1 V = f_1\mathrm{Im}(f_1) + \dots + f_1\mathrm{Im}(f_m) = \mathrm{Im}(f_1f_1) + \dots + \mathrm{Im}(f_1f_m) = 0. $$ $\square$

I hope there is no mistake this time. Comments are highly appreciated!
A: An alternative approach to proving that the radical is nilpotent is to use the Harada-Sai Lemma:
Given non-isomorphisms $\phi_i\colon M_i\to M_{i+1}$ between indecomposable modules of length at most $n$, the composition $\phi_{2^n}\cdots\phi_1$ equals zero.
The bound you get is much bigger than needed, but the proof is a simple induction.
It is worth noting that if $M$ is an artinian object in an abelian category, then its endomorphism ring $E$ is always semilocal, so $E/J$ is semisimple. This was proved in
Camps, R., Dicks, W.: On semilocal rings. Israel J. Math. 81, 203--211 (1993)
There is also a 2nd edition of the article available here
