Yet another attempt at finding something basic yet unreleased, here you go.
literally does what it says via console variables.
sm_spectatorchat_disabled - 0/1 - Disable text chat from spectators. Default is 0
sm_team2_disabled - 0/1 - Disable text chat from Team 2. Default is 0 (CT/BLU/Allies)
sm_team3_disabled - 0/1 - Disable text chat from Team 3. Default is 0 (T/RED/Axis)
sm_chat_admin_bypass- 0/1 - Should an admin bypass the above settings?. Default is 1
But how do I use it? sm_cvar sm_spectatorchat_disabled 1 - disables the chosen team's chat entirely. Set to 0 to enable.
inb4 someone sends me like 4 links with different variations of this that I couldn't find after 20 minutes of searching