Is it good idea to put all 401k to stable value?
How to allocate investments across the different investment sectors is an individual decision.
The question "is this a good idea" depends on your age, how soon you need the money, and how much of your total investments this constitutes. The money in my current employers 401(k) is a minor amount of my total investments. That is because I have been investing in 401(k)'s and IRAs for 30+ years, but only with this employer for 5 years. But 30 years ago the only investments I had were in my 401(k).
So If I had been asking 30 years ago, the question I would have been asking is "should I move all my investments into a stable fund?", but now it would be "should I move 5% of my investments into a more stable fund?" The answer to is this a good idea would be different.
If this was money in an Education 529 plan, and their child was in high school, I can see somebody wanting to become ultra-conservative with that investment. But then again many people have 529 money in a fund that autmaticly becomes more conservative as the child gets older.
If market drops a lot, should it be beneficial to put money back from
stable value fund to market ?
Now you are looking to time the market. You are guessing that the near term will be bleak, but next year you can guess the bottom, and get back into the market. That is tough to do. You might sell at the wrong time, and you might buy at the wrong time. You are trying to guess correctly both times.
There is one positive thing about your plan. Because this is 401(k) money if do this there are no capital gain taxes to be concerned about. This would also be true inside a Roth IRA or a traditional IRA. That is because all these retirement accounts defer taxes or even are tax free.