How to make a score be recorded as team?

So I am trying to make a Lives counter for two separate teams. My original idea was to set up a dummy score titled Team Lives:

/scoreboard objectives add lives dummy Team Lives 

The display is perfect except the dummy names TeamBlue and TeamRed don't show the color of the team they are added to even when I added the color option to team red and blue to red and blue respectively. My main problem is that I do not know how to make the Lives counter decrease upon a single teammates death. I tried setting up a death counter and adding a repeating command block with the command

scoreboard players operation @a[team=blue] deaths > @a[team=blue] deaths

but that gives an Invalid Argument deaths <- [HERE] which doesn't make sense since that command works in the chat bar. Then I needed a command which will remove a point when someone on one team has a score of one to remove one life. I was thinking of setting up a repeating command block with the command

execute if score deaths @[team=TeamBlue] = (some entity with one death) deaths run scoreboard players TeamBlue remove Lives 1

but that requires 20 command blocks, so if anyone knows how to compress it, I will gladly accept it. My main issue is the fact that the scoreboard operation command is not working in the command block


From my comment:
You need a regular "detect player death" system and the thing you run from it is the decrease of the "Lives" score. You don't even need to sum up all player deaths in a central score.

execute as @a[team=TeamBlue,scores={deaths=1}] run scoreboard players remove dummyEntity Lives 1
scoreboard players reset @a[team=TeamBlue] deaths