I'm in CA as well. Happy to point you to a few lawyers that can help.
You are partially correct, it's only enforceable in partnerships and when someone is selling their ownership interest in a company. So if another company buys you, then they can enforce the non-compete with them for a few years. but if you leave or are terminated, I'm not sure that they can stop you from being employed for 5 years. Again, IANAL, but I've had a few of these conversations over the past few months.