So Gehenna was used by the Pharisees to affirm punishment of sin in the afterlife.
We have learned in a Boraitha: The school of Shammai said: There are three divisions of mankind at the Resurrection: the wholly righteous, the utterly wicked, and the average class. The wholly righteous are at once inscribed, and life is decreed for them; the utterly wicked are at once inscribed, and destined for Gehenna, as we read [Dan. xii. 2]: "And many of them that sleep in the dust shall awake, some to everlasting life, and some to shame and everlasting contempt." The third class, the men between the former two, descend to Gehenna, but they weep and come up again, in accordance with the passage [Zech. xiii. 9]: "And I will bring the third part through the fire, and I will refine them as silver is refined, and will try them as gold is tried; and he shall call on My name, and I will answer him." p.24 Tract Rosh Hashana
So the Pharisees (of whom were both the schools of Hillel and Shammai) used Gehenna as a reference to a place of torment in the afterlife. It is interesting that for the Pharisees, this experience of torment was for some rehabilitative as in the concept of Purgatory.
Concerning this last class of men Hannah says [I Sam. ii. 6]: "The Lord causeth to die and maketh alive, He bringeth down to the grave and bringeth up again." The school of Hillel says: The Merciful One inclines (the scale of justice) to the side of mercy, and of this third class of men David says [Psalms, cxvi. 1]: "It is lovely to me that the Lord heareth my voice"; in fact, David applies to them the Psalm mentioned down to the words, "Thou hast delivered my soul from death" [ibid. 8].
Transgressors of Jewish birth and also of non-Jewish birth, who sin with their body descend to Gehenna, and are judged there for twelve months; after that time their bodies are destroyed and burnt, and the winds scatter their ashes under the soles of the feet of the righteous, as we read [Mal. iii. 23]: "And ye shall tread down the wicked, for they shall be as ashes under the soles of your feet"; but as for Minim, informers and disbelievers, who deny the Torah, or Resurrection, or separate themselves from the congregation, or who inspire their fellowmen with dread of them, or who sin and cause others to sin, as did Jeroboam the son of Nebat and his followers, they all descend to Gehenna, and are judged there from generation to generation, as it is said [Isa. lxvi. 24]: "And they shall go forth and look upon the carcases of the men who have transgressed against Me; for their worm shall not die, neither shall their fire be quenched." Even when Gehenna will be destroyed, they will not be consumed, as it is written [Psalms, xlix. 15]: "And their forms wasteth away in the nether world," which the sages comment upon to mean that their forms shall endure even when the grave is no more. Concerning them Hannah says [I Sam. ii. 10]: "The adversaries of the Lord shall be broken to pieces." R. Itz'hac b. Abhin says: "Their faces are black like the sides of a caldron"; while Rabha remarked: "Those who are now the handsomest of the people of Me'huzza will yet be called the children of Gehenna." p.27 Tract Rosh Hashana
Some Pharisees thought some people were destroyed in Gehenna surely within 12 months, and some believed that some of the especially wicked might suffer indefinitely longer than 12 months, possibly even after Gehenna is destroyed. This is what I call the Cultural Context of Jesus' warnings concerning being cast into Hinnom Valley. Not only is this extra-biblical, but it is also an addition to the Law of Moses and the prophets, neither of which ever warned of such.
The Biblical Context though consists of the Prophets Isaiah and Jeremiah warning of the coming destruction of Jerusalem by the Babylonians, and the bodies being piled high in Hinnom Valley eaten by wild animals and maggots (worms that don't die) and consumed by unquenchable fire (likely fire fueled by sulfur) because it was a cursed place because of the erection of an idol Molech and sacrificing their children to it.
And some think that Hinnom Valley was used as a trash dump during the time of Christ. There is debate over this, but if it was then I'd call this the Geographical Context. Was it, I don't know. But every city needs a dump and Hinnom Valley is ideally situated to be a dump for Jerusalem. And with its infamous history using it as a dump would be logical.
So which perspective did Jesus intend when He warned of being cast into Hinnom Valley. I think that the biblical context is the most solid. For example, when Jesus says it is better to pluck out one's eye or cut off one's hand than to keep them and sin and be cast into Hinnom Valley, He'd be referencing people becoming so consumed by evil so as to even sacrifice their children to their idols. And I immediately think of the destructiveness of drug addiction, alcoholism, sexual perversion. And Jesus could be alluding to the then coming 2nd destruction of Jerusalem by the Romans when again the bodies were piled high in Hinnom Valley, consumed by dogs and maggots and fire.
But of course Jesus could also be warning the Pharisees, using their own metaphor of non-specific post-mortem punishment of sin. Many appeal to the doctrine of the Pharisees for their belief in ECT, but as quoted above, being cast into Hinnom Valley was non-specific punishment. For some it was like Purgatory, refining them so they can rise to Paradise. Others might be annihilated within 12 months after death, and the especially wicked might suffer indefinitely longer than 12 months. To me though this is not as compelling as the Biblical Context, especially when one considers Jesus' attitude towards the doctrine and attitudes of the Pharisees which Jesus specifically repudiated.
And warning of one's life being trashed because of sin is also a powerful metaphor (possible Geographical Context). But to me the Biblical Context is more compelling.