My take from that was that the laws clearly need looking at.
Even if you'd taken away the whole touchline debacle and Afoa had just come back on with no delay, the effect of the yellow card, especially with the clock already being in the red, was not to penalise Bristol at all, but in fact to hand them an advantage, as they got to bring back on a first rate prop who'd just had a nice 40 minute rest to square up to Genge, who'd been taking his replacement apart despite having played the full game!
Yes, I know they had to take another player off to make up for Afoa coming on, but at that late stage of the game, the advantage to being able to hold up in the scrum was always going to far outweigh the downside of losing a back...