I thought about this as well, perhaps Sombra’s gun can apply the virus effect with it activating after a certain amount of shots are fired into into a hacked target.
I also would not mind it working like Junker Queen’s bleeding where it can be applied by melee attacking.
Bringing back opportunist and incorporating Virus into it can be a good idea too. With the Virus applying when attacking low health targets.