If you're worried about this, check out neo.tax (https://www.neo.tax/). They are one of the few companies that anticipated this and built a product to solve it.
Disclaimer: I work with startups as a consultant (not on optimizing their tax burden).
I know of two companies that used neotax and they were happy with the results.
What I don't know is if there is there anyone else in the space or some of the disadvantages of neotax. But... if you're an exec at a small -> medium size startup and you haven't dealt with this yet you could do a lot worse than giving these guys a call.