Hello and Happy Holidays!
@GreenSock - Thanks a lot for your help that time, but I had a lack of time to discover all the things deeply and made an animation with vanilla CSS and JS at that time. But, IMHO, it's better later than never, so I decided to go back and study carefully this case & try to resolve it finally, so I will appreciate it if you will give me some more help again.
I've discovered your recommendations and made some changes to exclude the links to some slides, that are not necessary - the previous slides. So, I've got the methods you've recommended and refactored the code to operate with one slide only on each iteration. It works nice as an endless slider, but I have a problem with the event listener. As you can see (check the console) - after the listener works, the function works too but nothing goes on in the browser. I've tested the function itself, giving it any existing index from images - it works too, why is it going so with the listener - I really can't understand and will be very grateful for your help if it's possible.
Best Regards! Here is it in Codepen