The other thing to bear in mind is that the onward flight may be delayed, or may even be held if there are sufficient passengers on late incoming flights.
I've had the experience of running/fast-walking between far-flung gates at Doha with a connection time that has shrunk well below the minimum theoretically possible, only to arrive at the gate for my onward flight and find it nowhere near ready to board. Obviously this can't be guaranteed, but it does mean all may not be lost if you have a late arrival