How can I deactivate the speaker on the Airtags?
As it often happens, I was able to find out a good enough video tutorial on Youtube shortly after posting this question. In case the video gets deleted, here are the steps:

Open the battery cover
Carefully use a sharp tool (such as a box cutter) to lift over the edge of the internal plastic cover, then pop it open with a screwdriver
Remove the speaker magnet (pictured below) using a screwdriver
Put a bit of glue over the corners on top of the electronics board
Reattach the plastic cover and battery cover