It's a bit less of a problem if you're at a company, usually a smaller one, where you can actually negotiate one-on-one with a manager or boss who has individual authority to negotiate a wide range of terms. Then you might be able to get objectionable terms removed, if the manager's reasonable and you're willing to compromise on other things (say, accept lower pay for more favorable terms). But if the manager's highly constrained by higher-ups and policy, you don't have a real negotiation.
Negotiation begins with shopping around. Any particular company may be unwilling to negotiate with you. That doesn't mean you can't negotiate, it just means you need to move on.
Incidentally, big companies do respond to these issues. When people start leaving in droves, hiring policies are reviewed, and changes are made (or the company dies).
It's pointless for programmers to do collective bargaining - our skills are simply too diverse. But to have a professional association that can create standard contracts, assist it's members in negotiating out of stupid IP clauses, perhaps create some certifications etc. isn't a bad idea.