Paul understood God’s ways. God’s ways are “Covenant-shaped,” they concern transformation, and the glory always comes at the end. It is the result of God’s Word going out and coming back with something good, His own goodness multiplied.
His doxology at the end of Romans 11 is not only the “glory” at the end of a Covenant-shaped dissertation, this glory itself is a process ending in glory.
The first thing I noticed is the threefold “from Him, through Him, to Him…” which is the Initiation, Transformation and Representation process of every Covenant. It is the “there and back again” with the Triune Man (Priest, King, Prophet) at the center.
Looking at the structure of each line reveals even more glory. The doxology concerns the end of the Jew/Gentile divide, the end of the Law, so it is fitting that this little passage is actually a recapitulation of the Ten Commandments, as “hidden riches.” 
Covenant Head (Structure)
Past, present, future
Covenant People (Glory)
|O, the depth of the riches,
(1 – Word from false gods)
ARK OF THE TESTIMONY
|both of the wisdom and the knowledge of God!
(2 – Word to false gods)
|How unsearchable are his judgments,
(3 – Work and Sabbath)
|and untraceable His ways!
(4 – Land and womb)
|Who indeed has known the mind of the Lord,
(5 – Murder)
BRONZE ALTAR (Blood)
INCENSE ALTAR (Smoke)
|or who His counselor has been?
(6 – Adultery)
|Or who has first given to Him,
(7 – Theft)
|and it will be recompensed to him?
(8 – False Witness)
|For from Him, and through Him, and to Him, are all things.
(9 – Coveting House)
REST AND RULE
|To Him be the glory to the ages! Amen.
(10 – Coveting household)
Now, remember, to understand the Bible you must think like a poet, since that is how God thinks, and how His prophets (including His Son) speak. All their words were spoken (from Him), and written (through Him) to be sung (to Him).
The vertical progression starts with the hidden wisdom of God and works down to obvious glory, the revealing of His mind, so let’s not dispute about that. (If you do want to dispute that, you can leave the Resurrected Poets Society now.) The correspondences to the Ten Words are a little more subtle, but obvious if we are familiar with the internal logic, the hidden wisdom behind the Ten Words, moving from source to glory (left column to right column) at every step. The doxology is simply the same process expressed in different media.
Firstly, the hidden riches are the source of all life, represented in the fatherhood of Adam, the first Sanctuary priest. Adam, as priest, was alone (which is why there are no priestesses). Those priestly (hidden) riches are expounded in kingly wisdom and prophetic knowledge. Although there are no priestesses, there are indeed queens and prophetesses.  Hidden riches are the silence of priesthood (listening to God in the Garden), while wisdom and knowledge are the Words of God spoken in State and sung in Church. These correspond to the prohibition of false gods (false word) and the prohibition of vowing falsely to God (false response).
Secondly, we move from the mind of God to those to whom He has delegated Covenant authority. The promises of God are always glory hidden behind a veil. The tearing of that veil requires obedience in faith (that is, trust in God’s character). This step also corresponds to the establishment of the Circumcision, which was a cutting of flesh linked to the fruitfulness of Land and womb, and a blessing to all nations.
Thirdly, the correspondence of murder and adultery might seem oblique, but murder is a cutting of flesh fueled by hatred, and adultery is a strange fire. These are the opposites of the purifying blood and fire in the sacrificial rite. The mind of the Lord does not find pleasure in the death of men, hence the institution of substitutionary sacrifice. Cutting into the sacrifice, dividing joints and marrow, pictures the Word of God revealing the heart. The counselor refers to Eve, or to the corporate “bride,” the Church, God’s helper and confidante.
Fourthly, theft corresponds easily to the blessings, given or stolen, as Covenant Sanctions, with the legal testimony of the one wronged in response. (Note that this is the point where Adam blamed God and the Woman!)
Finally, we have God Himself as the threefold house (forming), and all those in “the house of many rooms” as His glory (filling). God Himself is the only future.
So, there you go. Paul’s doxology is not only beautiful, it is legal.