Actually, the Rooskies were doing a good job in the ‘80s before the American Stinger missiles made the helicopter gunships ineffective.
A fascinating read is The Bear Went over the Mountain, which is a compilation of lessons learned from a Russian military perspective. There is also a companion book, The Other Side Of The Mountain, which is essentially the Afghan perspective.
In short, my take on it was that the old military adage about amateurs talking tactics and professionals talking logistics was turned inside out for the Soviets in the 80s. They had the logistics chain pretty well down, but were very slow to adopt/adapt tactics suitable for the Afghan experience...especially as you noted, once the Afghans got hold of some more sophisticated weapon systems.