That is the canonical schoolbook explanation of ww1, but I don't like how it frames the war as almost inevitable. Notably the Austro-German alliance was only fully formalized during the July Crisis when Germany offered unconditional support for Austrian war ambitions. While Austria and Germany were part of Triple Alliance, it alone would have not made German entry to war inevitable, as evidenced by Italy (the third member of Triple Alliance).
With Germany having major role in both modern drug history (e.g. Merck with morphine and cocaine, Bayer with Heroin) and their decisive role in the beginning of WW1, I think it is legitimate to ask if substance abuse had role in the hawkishness of German leadership.
Quick Google indicates that there is no strong evidence for Wilhem II themselves using significant amount of drugs, but less is known about the other high officials and generals.