Tolkien acknowledged the influence of Haggard's great romance
She in a 1966 interview published in the fanzine
Niekas, which may be read here:
Classic Fanzine, Niekas 18, Page 40
fanac.org
The Sherd of Amenartas is the potsherd that has been passed down through many generations within Leo Vincey's family. It contains inscriptions in different languages and using different writing systems. Haggard had expert help in designing the sherd, which was represented in a frontispiece. You have here the "Tolkienian" combination of
vast antiquity + philology + fantasy.
The metadata below describe the original scanning. Follow the All Files: HTTP link in the View the book box to the left to find XML files that contain more...
archive.org
Tolkien speaks of the "machine" that got everything moving. The interviewer evidently didn't ask him to explain that remark. But I think Tolkien meant that Haggard had the idea of a written record (cf. the Red Book of Westmarch) that has provided people in our time with a glimpse of an ancient time -- NB not "another world" but
our own world very long ago. The "machine" is a device that enables the story to get going.
What
nails the influence of Haggard on Tolkien is the fact that in his earliest writings, Tolkien actually lifted
Kôr (a place-name for a lost realm) from Haggard's romance.
Tolkien referred to the Sherd of Amenartas, in Haggard's
She, as "the kind of machine by which everything got moving."
I've just run across an interesting remark by Tolkien, printed in
The Peoples of Middle-earth, p. 26. In the first edition of
The Fellowship of the Ring, Tolkien had playfully interwoven the idea of
The Lord of the Rings as a record from the ancient past and the idea of the book as something he made up. After is publication, he wrote in a copy "This Foreword I should wish very much in any case to cancel. Confusing (as it does) real personal matters with the 'machinery' of the tale is a serious mistake."
In the context of fantastic fiction, Tolkien thus thought of the "machine" as a
contrivance that accounts for the existence of the narrative as a document that exists in our world. The interviewer evidently failed to ask Tolkien for clarification, but it seems clear that Tolkien was saying he was intrigued by Haggard's idea of the inscribed potsherd that provided people in the author and readers' own time with a tangible connection with the ancient past, one whose most obvious characteristic aside from its physical properties of shape, etc., and its antiquity, was
the multiple languages displayed. Again, you have here the "Tolkienian" combination of
vast antiquity + philology + fantasy.
Bunyan has nothing much like this; the Pilgrim's story is represented as a dream at beginning and end. The dream, then, is the "machine" for the story. I'm very interested in the various "machines" Tolkien could have used but never seems to have considered, the ones he considered but rejected, and the one he did use.
Among the ones he never seems to have considered would be the drug that really does free a consciousness from the usual constraints of time and space. I don't know when it is that this idea first enters literature as something distinct from the idea of a "mere" drug-dream. Haggard wrote what I now think of as the "Taduki Trilogy," three Allan Quatermain romances in which the "Taduki weed" is involved and by which Allan receives what are understood as being true visions of the past. The novels are
The Ivory Child,
The Ancient Allan, and
Allan and the Ice Gods, which I would not be surprised to learn had been read by Tolkien, but I see not the least suggestion that the drug idea ever appealed to him for his own writing.
I've written a lot here about Haggard, but there hasn't been much activity relating to the OP about Bunyan though I've tried to nudge that a little.