Aside from the legendary conquests of Frederick, where the German infantry really that disciplined and elite compared to the other European nations? Even up to World War 2, if they really were that strong, how did they become that skilled and elite compared to the rest of the world? What training and policies did the government do to ensure that result?
I guess you have to specify that question. The time frame you mentioned spans a lot of years and a lot of wars. Training and the quality of troops respective to other countries varies. You talk about nearly 200 years.
Overall, i.e. average soldier for average soldier: no. There were lots of elite and special forces that were "better" than their german equivalents. However the Prussian/German armies used much better doctrines/tactics and they had a long history of focusing on very highly trained and capable (petty) officers, who were always encouraged to think for themselves and take initiative. This allowed the Prussian/German armies to punch far above their weight.
As to why/how:
The tradition of the prussian/brandenburgian army began when the Swedes (and others) walked all over them during the 30 Years War, making it apparent that Brandenburg would have to defend herself. From then on prussian monarchs would always put a lot of emphasis on the army, leading Voltaire to make his famous statement that Prussia is an army with a state, instead of being a state with an army. The nobility was encouraged strongly to become career officers but promotions were (mostly) not based on status.
When Napoleon conquered and disbanded the Holy Roman Empire (aka. the 1st empire), the prussian military leaders as well as many politically powerful people were utterly shocked. Basically anyone other than the king was determined to reform the army again and fight Napoleon again. Amongst many smaller things, they introduced a new system for recruiting career officers: from now on the petty officer ranks would be open to middle class men (basically ensuring that the army would get the best and the brightest of the population for these positions) and they introduced a new kind of draft/reserve. The reforms meant that the prussian (and later the imperial german) would have a sheer endless supply of highly trained and capable enlisted men, petty officers and officers. Contrast this with most other armies in the world having a core (relatively) few career soldiers, which during war time would be joined by a mass of barely trained draftees.
This did not change when the allies forced the German Empire (the 2nd one) to massively reduce the size of the imperial army. Because the germans did the obvious thing and retained their highly valuable petty officers. So when the 3rd empire came around a couple of decades later, they had a huge number of these highly capable petty officers to build their new army around.