I’d think about going a bit radical…
Each team has 4 penalties they can give - like fouls in NBA. The fifth penalty mandates 10 in the bin, but the player comes back on if the opposition scores. Once a player is sent to the bin, the team gets their quota of 4 penalties back.
Ref can still send a player to the bin for a professional foul, but they come back on after (if) a try is scored.
For foul play, it would be a straight 10 in the bin - doesn’t matter if the other team scores.
The issue with the above is that it requires someone to count.