I just realised that I cannot remember noteworthy removals of German flag rank officers from command during wartime for reason of incompetence or similar. (Hitler did it a lot, but rarely so for reasons that stood the test of time, of course.)

It certainly happened a lot, but it doesn't appear to be well-documented or much-discussed.

Goering removed fighter wing (about a hundred pilots) and group (3 groups + a flight of 4 = 1 wing usually) leaders from command in 1940 and replaced them with younger officers, many of them aces. This happened during the Battle of Britain IIRC, and it led to an increase of aggressiveness.

On the other hand, army performance failures in Poland '39 led to a huge aggressiveness, doctrine and lessons learned training program for leaders from bottom up to division level.

_______________

There is a most noteworthy example of a leader failing and totally turning around towards a "great" military career:
Frederick the Great pulled a 'Darius III' in his first battle and ran when his cavalry lost the fight. His 2nd in command ordered the superior infantry forward and the battle was still won.
Nowadays Frederick is being considered to have been among the top ten generals of his century.