Regarding the "anarchy cost" of switching civics:
1) At Normal game speed, switching 2 civics costs the same amount of anarchy as switching 1 civic, so the 2nd civic is "free." The switch to serfdom can come at the same time as the switch to Vassalage/Bureaucracy.
2) At Epic game speed, the 2nd civic costs 1 turn extra, not 2. Again, timing the switch to coincide with your Legal switch can reduce the cost.
3) By the time I reach the Medieval era, I've usually completed an expansion phase, either through settling or war. My civ upkeep is usually quite high at this point (20-30% on the research slider), and since anarchy also halts maintenance costs, the opportunity cost isn't as high as many make it out to be. Also, due to the huge influx of

from Calendar/Monarchy/Currency, my cities are growing faster than my workers can keep up. Serfdom can be quite attractive at this time.
4) If I make the decision to switch to Serfdom, I'm not planning to come back to Slavery -- I'm sticking with Serfdom all the way to Emancipation. So the cost of "switching back to slavery" doesn't apply.
5) I don't think it's wise to leave slavery without at least a moderate-sized standing army (which will probably already exist if you've waged any Classical-era war). If I'm watching my borders and keeping the initiative against my neighbors, I won't necessarily need "emergency wartime whipping" until I reach Nationalism in the Renaissance era, and in that scenario I will have the draft.