In The Levites and the Boundaries of Israelite Identity Mark Leuchter deals with Deuteronomy as a text composed retrospectively in about -622.
The story about the discovery of the scroll in the Temple is fiction. What really happened is that after Josiah put an end to the priests offering incense at shrines around Jerusalem (2 Kings 23:5), his action proved highly unpopular. Josiah engaged Levite scribes to write Deuteronomy as a justification for what he had done.
All I will say about this is that it seems to me unnecessary and overly dismissive of signs that point to an older origin for a form of Deuteronomy.
In spite of that, there is much that is thought-provoking in Leuchter’s discussion.
He makes a very interesting case that, before Deuteronomy, books were the property of priests and exclusively held at temples as esoteric holy items. In Exodus 32:31-33 Moses asks God to either forgive the people or to erase Moses from “your book which you have written”. We can presume that this book was on Sinai and that for the Priestly scribes Sinai is parallel to the Holy of Holies in the Temple. So the Temple was the home of the book which God had written. This book was a cosmic, mythological book.
I wonder about the nature of such a book. There were probably books that contained prayers or spells similar to the Egyptian Book of the Dead. Maybe your name needed to be in the book in order for the priests to pray for your soul.
Anyway, Leuchter’s idea is that Deuteronomy was the first book that gave cosmic access to those who were not elite priests like the Zadokites. So it has a different world-view than P or Ezekiel.
In Deuteronomy Levites sit in the gates of the cities, and Leuchter sees them as claiming that the Torah itself is a gateway. So when Deuteronomy 27:9 says “Moses and the Levitical priests spoke to all Israel”, it is stating the principle that Torah is not the property of some priests in Jerusalem, but comes to all Israel by way of the Levites. There is access to God for all through the scribal and teaching activity of the Levites.
There is also a new meaning to the old function of the Levites as the bearers of the Ark. The scroll of the Torah now resides in the Ark, so the old function of the Levites has now made them bearers of the Torah (Deuteronomy 31:24-26).
The above passage also portrays Moses as the model for the scribal activity of the Levites. Before depositing the scroll in the Ark, Moses has become a scribe rendering his oral address into a complete, written Torah. This Torah, through the teaching of the Levites, gave all Israel access to Moses. This overturned the usual situation where common people got marginalized by “elite and exclusive priesthoods” (p. 187).