Yes, retail investors can do this or something like this to hedge their accounts in the face of a major market shaker. The pitfalls of a sell-off and re-buy are costs, the wash sale rules, and timing of the re-buy.
I don't know how large your positions are but if you have a $10 trade commission that's $200 to sell everything, and $200 to buy them all back. Granted $400 is only 2% on a $20,000 portfolio. If any of the positions you sell is currently at a loss you'd need to be out of the position (and substantially similar positions) for at least 30 days to book the loss and avoid wash sale rules. What if, inside the 30 day window, the stocks appreciate higher than they fell? This is exactly what happened with the brexit vote. Everything fell in the tank then within a week the market was just fine. In a long term strategy, most retail investors are best off to simply let the money ride.
You can hedge in other ways by buying some options or putting money in an index short fund or buying options on the index short fund. This way you're not actually selling your positions but you'll recoup some losses in the event of a loss. If you're really concerned maybe you let your new contributions to the account sit in cash until after the event that's concerning you.