I work for corporations through a consulting firm. Most won't let you deal with them directly. But I get a paycheck every 2 weeks, I can't really see them being able to take that away from me retroactively...
But trust me the corporations (the one I work for is an international electronics manufacturer) are very polite and respectful and very much understand the realities of risk/reward, and that you have to spend money to make money.
And they all have an army of QA engineers double-checking work because they will not allow $1 million dollars of business to be dependent on a single point of failure. Even if they bring you to court (they never would) I'd assume its VERY difficult to get compensation. If you hire an employee and he does a bad job, do you get to sue him for damaging your profit margins? Hell no, you just get to fire him and hire a new guy. If everyone were legally on the hook for the work they produced, it would be like assuming that everyone you ever hire is required to be omniscient. The reality is, you can't hire someone with a 50 IQ and then sue them because you believe one of their lines of code hurt your profitability. It's your fault for hiring them.
I gotta say a lot of these responses I'm getting are very paranoid. When a company pays you for work it's really hard for them to take that away from you. The most that's ever really at stake is your current paycheck and not even that really because the department of labor is VERY harsh on reputable employers who deny paychecks.
It seems like your point is more of a fantasy scenario where they give you a billion dollars & 5 years of unsupervised time to design a huge blackbox program that has to do X, then find out it doesn't do X. The software industry is simply not like this. All tasks are broken up into discrete components and if you're not doing a good job they'll fire you and bring in a new team to finish the job.
The ONLY way I've actually heard of an employee losing $$ is when they have a long-term employment agreement and they break it. It's kindof like an athlete signing a 10-year deal & walking off the field after 6 months. Then, yes, you're liable.
Otherwise being a paid consultant is pretty much the same thing as being an employee. Also, I doubt that companies will sign some "boilerplate contract" that absolves you of all liability. They'd rather hire someone who is more confident. That's not a dig, I really mean that sincerely. Over-negotiating and specifying a bunch of "unrealistic-covering-my-ass-terms" can come off as amateur.