How to add element to the list of adjacent images?

There’s a few problems here. Your regex is pretty broken. You should be using a tool like regex101 to test that.
I think for your first function you need to add the possibility of newlines between the image tags like so:

/(<img.*?>\r?\n?){2,}/

You can add * before the ?‘s if you want to grab multiple image tags when there’s multiple newlines between them.
For your second function it looks like your escaping inaccurately. try this:

/<ul class="orbit-container">\s*?(<img.*?>)?\s*<\/ul>/

Your second potential issue is that you’re running both those functions on the same filter and I would guess that the order they run in is important to you. add priorities to the add_filter calls as a third parameter. the default is (I think) 10. So make yours 10 and 11 or 9 and 10 or something like that, whatever works best for you.