Having been there and helped train & equip the Afghan Air Force, you've got some of the issues correct but you are wrong on a particular point: NATO controls the money for buying the spare parts -- the Afghans don't have any money -- so there parts that are purchased eventually arrive. Unfortunately, that is a very slow and painful process that can take weeks at best, months typically, to acquire particular parts from either the Russian or Italian aircraft manufacturers.
One of the issues is that the technical orders are not in a language native to Afghanistan. There are a few (old) Afghan mechanics and aircrew (trained during the Soviet occupation or prior) who read Russian and can understand the tech manuals for the Russian built helicopters. The C-27A tech manuals are in English and it can be problematic to find aircrew or mechanics who read that well enough on their own.
Eventually we'll get there...but the old adage about "How long does it take to give someone 10 years experience? -- 10 Years" remains true whether you are teaching an Afghan or someone from any other country or job.
My experience was positive - most genuinely appreciate the service and sacrifices the NATO personnel make and the donations of aircraft, equipment and more to help bring safety, security and stability to Afghanistan. Unfortunately thought, there are no shortages of challenges...but Afghans are survivors, and survivors are smart and ingenious. There are things they do that make no sense to us without an understanding of context or their version of risk management...they would take an aircraft into the air (if we let them) that we wouldn't...
(The C-27A itself is a problem...yes, they are old and there are parts obsolesence and other mechanic and structural problems associated with old aircraft...I'm not a big fan of the company that made it...but it is basically underpowered for the high density altitudes and payloads for which Afghans operate and need to move.)
Sure it easy for them to say, "Buy us new stuff" (just like our kids). One of the greatest challenges for them is to build & retain the institutional knowledge and skills associated with acquisition and logistics, not because they are inherently corrupt or uneducatable, but rather they lack the fiscal & other resources to be self-sustaining without NATO or America's assistance for the near-term plus. Until those foundational elements exist (whether in Afghanistan or in other underdeveloped or war-torn countries in which NATO or America's military is trying to improve the ability of the local military forces to appropriately support their governments), the educational deficits and lower-order Maslow needs will remain the problems you accurately describe.