That's been tried but money is fungible. Let's say that a company is going to spend $1M on R&D. So they repatriate $1M of their foreign profits and tell the government "Look, I took $1M home and I spent $1M on R&D so no tax". The problem is that they would have spent $1M anyway.
Things have been tried to get around that. For example, only an increase in R&D spending will qualify for the tax break. But the company was planning to increase their R&D spending anyway, so now their increase is tax free. It's extremely difficult to craft a law that will achieve it's real goals.
It's true that many people hold shares in corporations but if you look at the statistics of ownership, the wealthy people in this country own the majority of the wealth, which means shares of the corporations. So when you give a benefit to "shareholders" you're mostly helping the wealthy increase their wealth. Certainly, if that's your goal, those are the policies you should support.
Fair is a complex question. Corporations are people in the eyes of the law. As a matter of policy, I believe all people should be taxed in a fair manner. Different people will have different ideas about what's fair - but as long as the goal is "fairness" I think we'll come to some acceptable compromises.
Mike