Origin of the phrase: "they went back to the well"
It appears there in not much on this expression. Your assumption of the sacred wells with people visiting them regularly is very suggestive, but according to The Dictionary of American Slang, the expression is quite recent:
go back to the well (verb phrase):
- To return to a reliable source : We just kept going back to the well and he just kept making it (1980s+)
Go back to the well
- To return to specific resource or source of information.(United States).
Ngram unluckily is not helpful because the expression is often not used in the context we are considering here.
another shade of meaning comes from the nonprofit/philanthropic world, to "go back to the well" is to return to a reliable or generous source of financing for an additional ask (yet doing so carefully)