Tom Mase is a professor of mechanical engineering and former associate chair of the department of mechanical engineering at California Polytechnic State University.
With a long history in golf research he approached the flagstick question in a careful, comprehensive, and scientific manner.
He tested with the flagstick in and with it out. He tested 'on center' hits and 'off center hits'. He tested with fiberglass, tapered aluminium, and dual diameter aluminium sticks.
He tested different speeds at the hole. He tested hitting the flag dead on, hitting it on the side, and catching the rim of the hole.
No-one could claim Mase took any shortcuts in his research.
THE BOTTOM LINE.
While there is a lot more we could write, the bottom line of his research is that hitting the flag sometimes helps if it hits dead on but if the ball hits the flag on any sort of angle it will most likely kick away a ball that would otherwise have dropped.
The jury is in. The flag is out.
If you'd like to read all the fine detail this is an in-depth Golf Digest article.