Elected officials transfer all their equity assets into one or more funds before taking office and get shares in the fund.
When they leave office, they can receive the current cash value of their shares, without any capital gains tax, or can get their original contributions back, if the fund still holds them.
If the country did well, the fund did well, and so do those who were elected. Optionally, make this available to all government employees at the federal, state, and local levels, and generally to individual investors.
Might reduce people from making a career out of being a politician, but that would be a good thing. Too many cases of middle-class representatives and senators leaving office decades later as multi-millionaires.
Politics should be something people do out of a sense of service, not to become wealthy.