One of the issues with Psalm 82 is that "elohim" has more than one meaning (it can mean God, gods,
The term "elohim" is used for beings of the spirit realm.
the God of Israel
Genesis 3:3 ESV
(3) but God said, ‘You shall not eat of the fruit of the tree that is in the midst of the garden, neither shall you touch it, lest you die.’”
gods and goddesses of other nations
1 Kings 11:33 ESV
(33) because they have forsaken me and worshiped Ashtoreth the goddess of the Sidonians, Chemosh the god of Moab, and Milcom the god of the Ammonites, and they have not walked in my ways, doing what is right in my sight and keeping my statutes and my rules, as David his father did.
celestial beings of God's heavenly council
Psalms 82:1 ESV
(1) A Psalm of Asaph. God has taken his place in the divine council; in the midst of the gods he holds judgment:
ones that have died and are in the spiritual realm
1 Samuel 28:13 ESV
(13) The king said to her, “Do not be afraid. What do you see?” And the woman said to Saul, “I see a god coming up out of the earth.”
demons
Deuteronomy 32:17 ESV
(17) They sacrificed to demons that were no gods, to gods they had never known, to new gods that had come recently, whom your fathers had never dreaded.
magistrates/judges or can be used as a superlative, e.g. "great").
Not mortal judges.
The prohibition against worshipping other "gods" was a prohibition against idolatry, because statues were often used to represent imaginary deities (and demons could use that idolatry for their evil purposes).
No, it's not about wood and stone that only represent actual spirit beings, it's about the actual spirit beings being worshiped.
The wood and stone idols that are carved out can be burned up, crushed, and destroyed, but that does not destroy the actual spirit beings they represent.
Those spirit beings are worshipped even before a wood or stone idol is carved out.