I don't see the distortion you speak of but I do see the artifacts in some of the frames. Unless you're talking about the wide angle lens distortion? Which is natural to my eyes (I've seen it so many time I'm used to it). Some programs (maybe Darktable?) can fix lens distortion but I've never tried that on thousands of images in batch mode.
If the artifacts were already in the downloaded images after the capture events, then no, nothing you can do. Unless you invent a time machine to go back in time to try again.
However, maybe the owner of the webcam has an archive system in place and maybe you can contact them to see if they'll give you a copy.
When I do these webcam image grabs via bash scripts, I usually have the grab timer set to half of whatever the online webcam's update timer is set to. That'll give me two same images per webcam's image update. I then go back to review and select the best one of the pairs. It's more work but for me, it's worth the end result.
With this method, I've run into situations where I had only one good copy of the pair. Sometime I don't have either. It's usually because the script has run again on top of a previous image grab that is taking too long to complete and the script then clobbered that previous job. One minute update/grab cycle is actually too fast for the grab script sometime. Maybe there's a hiccup or a lag in the internet connection, maybe the grab script started in the middle of the server's image update, maybe the grab-image computer is suddenly 100% CPU from another program, etc, etc.
That is what I think has happened to your images.
What the script should do is off-load a grab job and let it complete its grab independently and still have the script be able to start off another grab job on the next one minute cycle to complete independently. I do not know bash scripting well enough to pull this off. Maybe someone here can offer an insight on this. I've strikethroughed this idea. It won't work if the server updated its image in the middle of a grab. There's nothing left of the previous image to grab anymore. The script need to complete in time.