They aren't symmetric sides of a coin though.
1. If you become unemployed because it "succeeds", then a diversified portfolio probably does well as other industries reap the benefits, and if you have to cover lost wages you're at least "selling high."
2. If you become unemployed because it "fails", then there's a crash/recession where everyone is spooked and you get screwed by being forced to "sell low" during the transition.
I suppose there's also the chance you're put out of a job by powerful AI, but the "winners" are all lesser companies you never invested in, so you lose both your job and investments.