If one team member is lost due to something like horse turning up lame between phases, the team alternate can be subbed in with a 20 point penalty. If a team member doesn’t finish a phase (e.g. retires on xc), that’s a 200 point penalty, but the alternate can be subbed in for show jumping. If I recall correctly, there were several teams who made substitutions in Tokyo.
The substitution rules are intended to allow more teams to finish. The penalties are severe enough that a substitution would likely take the team out of medal contention, but the team can still finish.
ETA: Went to check my facts and I didn’t have the complete picture so I edited the above.
Here’s the cut and paste from the Olympic rules document.
4. Scoring
4.1. For the team classification, the following penalties will be allocated for the nonstart/non-completion for a test for any reason:
Dressage =100
Cross Country = 200
Jumping = 100
4.2. Substitution for the team competition:
A combination may be substituted by a reserve combination for Medical/Veterinarian
reasons in any of the three tests after the start of the competition.
Substitution will incur a penalty for the team of 20 points.
One (1) substitution will be allowed per team.
No substitution is permitted where the combination has been eliminated for Dangerous
Riding, Abuse of Horse or where the combination has been disqualified
Source document: