There have been lots of great answers. You say "simple technologies" but that doesn't really give me an idea of WHEN.
The biggest issue is that to deafen someone without killing them depends on the level of knowledge and tech available. And since I do not know when (it isn't in your question) it's hard to answer.
As to how: this will take precision. A hot spike will do, as will molten metal, like lead, has been recorded in history.
But it actually, historically has been used in at least one instance, in the case of Vazul in during the late 900s-or early 1000s. Blinding in Medieval times mostly happened with war or politics, making them unfit for command or leadership. In the case of Vazul, who was heir to the throne of Hungary, they reportedly did one better by also filling his ears with molten lead.
But, they did not just make him deaf you notice. They made him blind as well. Just making him deaf would not have been enough. A missing ear or deafness can be hidden. A person can still be used as a symbol even if they cannot hear. Especially if they can read and are educated (someone with them can make sure they say specific phrases in response to things).
I can tell you why it hasn't been used much and you can go from there.
- you'd have to go in the ear canal, and that's not highly visible.
- you want it to be highly visible as a deterrent. Taking off an entire ear is actually preferable to this. And, that's far more theatrical than a delicate procedure to deafen.
- these people won't be listening to you chastise them later if they do anything else. Most civilizations, in early stages, do not have a high level of reading and writing. What it means is that there is no way of giving these people instruction and orders, no way for them to understand. And unlike blindness, it doesn't make them helpless and unable to attack you, just deaf to your pleas.
- You WANT your victims to survive. They need to be a walking advertisement. If this is primitive, the procedure itself has a high probability of killing them. This is actually pretty likely that close to the brain.
- It's not on the list of things for a reason. Blinding someone, which is relatively "easy" is but other things were not carried out as much as you might think.
Amputation was in Byzantine times, supposed to be a replacement for the death penalty. You'd likely die of your wound, however, there was possibility you would not. A rich man might get a surgeon in to do it properly. A poor man got a man with an axe.
Taking a tongue out--not giving the person a voice is far better than making them unable to listen. Symbolically.