So you've written some code and give it to $company under a contributor agreement. And that company gets bought out by $idiot_company. So what? You still have your code. Everybody still has the publicly released versions, including your code under the licence at the time.
I'm trying to understand what you actually lose by signing a contributor agreement. Actual, practical issues, not ideological ones.