Upon what? The “dissolution” of the HOA? Assuming so which is common for an HOA, it is generally its own legal entity which is separate from the mandatory membership component.
What the legislator wants, and what can be done legally are likely to be two separate things. They could certainly repeal laws that allow for mandatory membership to be durable upon sale, and provide support for HOA bylaw enforcement, but a law “abolishing” HOAs entirely would likely be struck down a day later. That Likely runs afoul of the first amendment among other things. It would be like saying people can’t form private political groups or enter into private contracts; nonsense, as HOAs are often private non-profit corporations.
Yes upon dissolution or termination as it’s called. Says goes back to public upon sale.
“Upon dissolution, the corporation's assets, both real and personal, must be dedicated to a public agency or utility for purposes similar to those for which the assets were originally intended. “