I grew up watching guys like Steve Davis, Alex Higgins, Jimmy White etc on TV in Ireland. The middle finger moving as you described was quite prevelant amongst pro players I would watch on TV. When I started playing on a daily basis in the mid eighties I started to intentionally mimic those players by having the middle finger twitch on my left bridge hand (just to try and look like the top players did

)
As the years went by, that middle finger twitch became automatic and I now do it without thinking about it and I have also noticed that I don't do it on every shot, but when I am really dialed in and focused on a tough shot, then that finger starts tapping and I make the shot.
A friend I used to play with often said that once he saw my middle finger move like that then he knew I would make the shot and if I started to do it on every shot then he knew he was beat
Not sure what it accomplishes other than being a subconsious reminder to me that I am giving 100% of myself to that particular shot.