If one is close enough to the wall that one can stretch to hit the button or will be able to do so within 100ms, I would think stretching would save time. That having been said, the cost of taking an extra stroke when not needed is below the cost of failing to take one when needed. I don't think swimmers can really judge each other's positions effectively (I wonder if it would be useful to include cylindrical convex mirrors on the bottom of each lane to allow swimmers to see what's going on in all the other lanes) but if a swimmer knew another swimmer was about to touch the wall before he could finish his stroke it would not seem reasonable to put his arms immediately forward and hope he's in range; if he is, he wins. If not, he would have lost anyway. Of course, if the other swimmer wouldn't have touched the wall before the stroke was completed, and the lunging swimmer wasn't in range but would have been after completing the stroke, then the lunge would lose the race unnecessarily.
I don't doubt that it's better to train people to keep stroking until they hit the wall, than to train them to try to judge end end, but I would think that expert swimmers could sometimes benefit by the latter strategy.
Gliding into the wall in swimming is equivalent to jogging across the line in running.
I began competitive swimming when I was 9 years old and one of the first things I was taught was NOT to glide into the wall at the end of the race. I’ve been in many close races and taking an extra stroke has always benefited me.