As for the serpent motive, I think it relates to the movement and shape of glaciers. Here are some pictures.
Snake-like path of a swiss glacier: [1]
The end of a glacier which (with skimming) may look like a snake head releasing streams of melt water: [2]
In these ~110 year old illustrations glaciers are depicted with weird lion head and sluggish lizard body: [3]
Ahi seems to be Azi Dahâka in Zoroastrianism, which also has a lot of long-winter themes [4]:
"The world was imagined as lasting a long year of twelve millenniums. There had been an old myth, connected with that notion, which made the world end in a frightful winter, to be succeeded by an eternal spring, when the blessed would come down from the Vara of Yima to repeople the earth. But as storm was the ordinary and more dramatic form of the strife, there was another version, according to which the world ended in a storm, and this version became the definitive one.
The serpent, Azi Dahâka, let loose, takes hold of the world again. As the temporary disappearance of the light was often mythically described either as the sleeping of the god, or as his absence, or death [...]"
This story about the Vara is also super interesting and similar to the Ark story, though not with a big flood but a long winter and "foul frost". The numbers make more sense, because they gather over a thousand "seeds of men and women" instead of only a single family. [5]
[1] https://www.swisseduc.ch/glaciers/glossary/valley-glacier-en...
[2] https://i.ytimg.com/vi/CTPcUSfYG3c/maxresdefault.jpg
[3] https://news.climate.columbia.edu/2018/04/02/culture-history...