You should use reset_actions() which clears actions that are already stored locally and on the remote end.
You can add some time delay while performing mouse movement operations.
for i in range(4000):
actions.reset_actions()
actions.click(cookie)
actions.perform()