that's a wild theory, considering that Tolkien himself described Gollum to be "a small, slimy creature" after the revisions, probably because of Jansson's depiction of him. and although the parallel is clear between many characters of the Hobbit and the Bible, do you have any credible sources that Tolkien took inspiration from apocryphal texts (or in this case the Hadith) ?
Not in this specific case. There are other examples that could be brought up, such as the Gift of Men (death), which may draw on the Book of Jubilees which suggests that death was given to man to limit wickedness and allow for renewal. Or Book of Enoch and the fall of Numenor. "Credible sources" will be difficult to procure as Tolkien notably avoided citing specific influences when discussing his works