Anxious federal workers have dipped into retirement accounts when money got tight during past government shutdowns. Repeating that mistake to make ends meet while Washington’s latest political tug-of-war plays out could rob future retirees of a full year’s salary.

About 800,000 government employees won’t get paid Jan. 11 as the budget standoff between President Donald Trump and congressional Democrats rages on. Nine agencies remain unfunded as the battle over Trump’s border wall prepares to enter its fourth week, leaving furloughed workers and the skeleton crews of “essential” staff keeping the administration going with no idea when their next paycheck will...