Most important was good luck in that shot. On that distance you can still miss a tank sized target with fire control in full stab mode because of wind and other factors.
BTW high high above sea level was the shot taken? in thinner air bullets fly farther.
Last first, AIUI, the shot was taken in the vicinity of Mosul. Mosul is at about 200 meters above sea level with the surrounding hills being about 300-400 meters. As a point of comparison, Grafenwoehr is about 450 meters above sea level. More important than elevation is barometric pressure, because really, that's what you're concerned about when talking about elevation above sea level.
Regarding the bolded bit, IMHO, the luck factor was at least great to infinitely great. Color (or colour because Canadian) me skeptical because there are just too many variables and too many degrees of difficulty to overcome. I wasn't there, fine, they made the shot, I won't say it didn't happen, but I would like to know approximately how many rounds were fired. How it came to pass with all those rounds being fired into the target vicinity that nobody noticed. How was the spotter was able to see the impact of the missed rounds so that accurate adjustments could be made.* Were they in fact using a thermal sight which would eliminate the problems of light shimmer? Why were they so confident that the target wouldn't move during the 8.5-9 second flight time? Just to name a few questions I have.
*Not always easy to see the precise impact of a tank round at that range much less that of a rifle bullet.