There are several ways that contracts may become
invalid. Some may apply to HOA homeowner contracts. Most laymen will recognize these issues just from conducting personal business.

1. Oral contracts for over $500 are
not enforceable in Florida (check the laws in your state).
2. All involved parties do not have a copy of the contract (anything other than an original signed copy
may be challenged).
3. The party or parties that signed the contract did not have the legal authority to do so.
4. The contract is unreasonable (this is a
wide open door for argument).
5. The language in the contract is not clear or concise (what contract is these days?).
6. The contract violates the law (there are over 3,000,000 laws in the U.S., take your pick).
7. The requirements of the contract were never enforced or were enforced sporadically or selectively.
8. One, some or all of the parties involved are deceased.
The idea that contracts are written in stone and are forever, no matter what, are
incorrect. Things change. People change. Sometimes for the better. A new federal regulation to void antenna restrictions in HOAs would most likely apply to #4. and #6.
directly!

In regard to 1 and 2, HOA documents are never given orally, they are given in writing at settlement, and the purchaser signs a document that states a copy was provided as part of the closing documents.
Nevertheless, it is not the "contract" that places the restrictions on the home. The sale of the home has little to do with the restrictions. In most developments, the covenants and restrictions are recorded when the property is subdivided, way before the first home is even built. They run with the land forever, just like easements and other right of ways, no matter who lives in the home, or who dies.
I agree, as you state, if a federal or state law was passed that invalidated antenna restrictions in subdivisions with CC&Rs. Then yes hams would have a starting point to fight the issue.
However, I highly doubt that will ever happen, considering how much resistance there is from non-hams. Even so, on the slim chance that it came to fruition. IMO, the issue would be tied up in the courts for years. The HOAs more than likely would file an injunction to stay any implementation of that law. Citing the basis they intend to file a class-action lawsuit, and time is needed to identify and assemble class members before appealing to the courts. 10 years for the conclusion of a class action lawsuit of that magnitude would be routine.
The restrictions do not seem unreasonable, except to the minority of hams that live in those areas. What is the argument? One that will sway the Courts or Congress? What, they can't put up an effective HF antenna for ECOMM? That is the only valid point that shows any interest or support from the mainstream, is our ability to provide emergency comms. There is nothing preventing a ham from getting on the air on the bands from 6 meters on up using indoor antennas. Some hams can even use HF with indoor or outdoor stealth antennas as well. That argument is weak at best.
Playing the Devils advocate, on the other side of the argument, they can argue, "There already are plenty of established HF ham stations on the air in non-CC&R areas that can easily handle the volume of traffic in any emergency. Why do we need to tread on the majority of non-hams rights and invalidate CC&R, so a handful of hobbyist that previously agreed not to have visible antennas, now can have a antenna outside at home? Even so, hams who live in a residence with CC&Rs, could easily assemble elsewhere during an emergency, and erect emergency antennas, as hams practice every year at their national annual field day emergency preparedness exercise."
It's a losing battle, one hams likely can never win, due to a lack of mainstream support, finances, and strong argument to the contrary. If someone is truly stuck in a home with CC&Rs, I would contact all of the hams in the development about starting a community ham club, then approach the HOA board as a group stating the purpose and asking if it's possible to erect an antenna system somewhere on the common ground out of sight, or at the Association's main building? I would be clear, that it would be at no cost to the association and the club would pay for any cost or insurance that my be necessary. It never hurts to ask.
73