I’ve looked into this a bit myself. According to material I was directed to on FAIR (Foundation for Apologetic Information and Research) which changed its name somewhat recently to FairMormon, the belief is that Masons have a portion of the truth but Joseph Smith restored the ordinance to the fullness of truth (not the exact words but that’s basically it). Do LDS believe ancient Christians performed these rituals? It’s hard to say if they believe ancient Jews performed the rituals, the very earliest ancient Christians, or a little of both. No one knows exactly when the Great Apostasy was, and Mormons are a little fuzzy on their ancient history. I would presume that Peter James and John are believed to have been relevant to this ostensibly ancient practice; they do play such a hugely repetitive role in the ceremony. But the rituals supposedly taught to Peter James and John (not sure if they were taught to anyone earlier) are seen as the fullness of the practice as given by Heavenly Father, while Masonic rituals would be examples of practices that partially re-captured some elements of what was revealed but not the whole thing, and certainly not with the authority of a living prophet.
Joseph Smith Jr. was a high ranking Mason prior to being visited by Moroni (can’t remember what level), so it’s not hard for anyone else to see what was the source of his material- but it had to fit in with the restorationist theme.
I doubt that Joseph was a mason at the time of the publication of the Book of Mormon. It seems from the LDS church’s own history that it was Joseph’s brother Hyram who sponsored Joseph as a Freemason. That was during the Kirtland period, several years after the Book of Mormon was published.
It is interesting, though, that the Book of Mormon contains a very anti-Masonic passage:
22 And there are also secret combinations, even as in times of old, according to the combinations of the devil, for he is the founder of all these things; yea, the founder of murder, and works of darkness; yea, and he leadeth them by the neck with a flaxen cord, until he bindeth them with his strong cords forever.
23 For behold, my beloved brethren, I say unto you that the Lord God worketh not in darkness.
If Joseph Smith was a Freemason before the publication of the Book of Mormon, it is further evidence that Joseph did not write it. I still believe that Sidney Rigdon wrote the religious parts of the Book of Mormon. His intellectual and religious fingerprints are all over it.
My wife and I both noticed, in our research into Mormon history and doctrine before we left the LDS church, that Joseph Smith virtually NEVER preached from the Book of Mormon. Yes, he once said it was the most correct book on the Earth, but he almost never taught from it. In fact, most everything Joseph Smith taught from 1831 forward directly contradicted the Book of Mormon.
The Book of Mormon is a very anti-Mormon book, since none of the distinctly LDS doctrines are in it. Perhaps that is why Joseph almost never taught from it.
Also, it is more evidence that the BoM is a 19th century work of fiction, as it addresses all of the subjects that concerned religious people of 19th-century America, including Freemasonry, which did not exist in Nephi’s time.
Paul (formerly LDS, now happily Catholic)