As Wolfsblut says, this is actually how I proceed. I setup a “login” level where your players choose which teams they want to join. It then stores the result in an Integer directly in your PlayerController.
When you need to register the hit and calculate damages, cast to the Instigator and check if it belongs in the same team, then apply damages.