The short answer is yes. The government created the 401k through laws. Since the government, i.e. your Congressional member of Congress that you voted into office and the other members write those laws, they can change them at their will.
Will they do that? It depends.
The history of the government is very clear about how it acts when more money is required. On April 5th, 1933 under Executive Order 6102 the government confiscated gold. In exchange for the gold Americans were given Federal Reserve Notes, which were paper that represented the gold, held by the Federal Reserve. The penalty for not turning in your excess amount of gold was $10,000 and up to 10 years imprisonment. That was a lot of money back then.
Taxes will go up. That is the first step they will take. So while you are thinking about that, do you really want to put money into a 401k if you think the tax rates will be higher when you take the money out?
For those who have money in IRAs and 401ks right now, the question is what will the government do when it becomes desperate for money. (By the way…the government is desperate for money right now.) Anything is possible.
Retirement savings accounts have already been victim of money hungry Congressman. There have been two such potshots taken at Americans retirement money in just the last few years. In the Highway Investment, Job Creation and Economic Growth Act of 2012, Congress was intent on making a grab for retirement assets. Fortunately, IRA funds escaped that act. Most recently, Congress attempted to invade IRA funds to pay for lower student loan interest rates. That was defeated as well. If you have money in 401ks, IRAs or other plans, tax diversification is paramount.