Is the sprocket worn, it looks like it might be..
Your master link is a different color is it the right one.?
You say the chain has miles on it. Rotate slowly by hand and observe if chain goes up and down in the middle, if it does it has some stretch.
Must be adjusted on tightest part....... If not. Then everyone it goes to the tight spot it tries to pull the wheel forward..may result in a clicking sound
Also a sticky kinked chain link may do that.