"Wood and water, stock and stone, I can master."
--- Treebeard
The word "stock" here comes from Old English "stocc," meaning "trunk" or "log."
As a phrase "stocks and stones" also goes back to OE, where it refers to idols made out of wood and stone.
"Ge þeouiað fremdum godum, stoccum and stanum."
"You are servants of strange gods, [made] of stocks and stones." (Deuteronomy 28)
We also find it in Middle English in Chaucer's Troilus & Criseyde (3.589-90):
"He swor hir, yis, by stokkes and by stones,
And by the goddes that in hevene dwelle""He swore to her, 'indeed, by stocks and by stones,
And by the gods that in heaven dwell'"
And in Early Modern English in Milton sonnet 18:
Avenge, O Lord, thy slaughter'd saints, whose bones
Lie scatter'd on the Alpine mountains cold,
Ev'n them who kept thy truth so pure of old,
When all our fathers worshipp'd stocks and stones;
And in a 19th book Tolkien surely knew:
"There was a worship of nature instead of stocks and stones."
A. H. Sayce, Principles of Comparative Philology
Now when Treebeard uses it, he certainly isn't referring to idols or pagan gods. Yet by putting this phrase in Treebeard's mouth to cover the wide range of things in Nature Treebeard is saying he can master, Tolkien gives the phrase new life and meaning. This is something Tolkien does with his sources, whatever they may be, whether words or stories. Think of what he does with the world "mathom," which means "treasure" in OE, but is used ironically in LotR to mean a gift that is anything but. Or Plato's Atlantis myth which Tolkien turns into Numenor.
Now this morning I was reading the Greek poet Hesiod, who in his Theogony (35) says:
ἀλλὰ τί ἦ μοι ταῦτα περὶ δρῦν ἢ περὶ πέτρην;
"But what's all this about oak and stone?"
Another way to translate this would be
"what's all this about tree and stone?"
The Greek word here (δρῦν -- dryn) does mean "oak," but it also means just "tree" -- and so we're back to stock and stone.
But wait there's more. The word is also related to the word δρυάς, from which we get "dryad," a tree nymph, a word Tolkien uses in one of his best phrases, describing Ithlien as possessing "a dishevelled dryad loveliness."
And even more because, as Tolkien knew, the word used in Old English to translate "dryad" was "ælfen," and I'll give you one guess what that means.
It always comes back to the elves. It's "ælfen" all the way down.