It is important to know whether 1) in plan roth rollover of after tax contributions is possible, 2) in service non hardship withdrawal of after tax contributions is possible, 3) allowed frequency of 1 and/or 2, 4) any fees involved in 1 and/or 2, 5) whether split rollover is possible, ie whether earnings on after tax contributions can be separately directed to traditional IRA, or whether entirety of after tax sub account (contributions plus earnings) go via rollover to Roth IRA
if 1) in plan Roth rollover is allowed then everything is easy. Some plans even automate this, ie automatically convert after tax contributions to Roth at some regular interval. Then you don't have to worry about any IRA rollovers
some plans will charge fees for these maneuvers, so you'll want to know that, and balance frequency of your moves versus the fees
if split rollover is allowed, things are pretty easy, the after tax contributions go to Roth IRA, earnings go to traditional IRA, and then you rollover the traditional IRA back to the 401k (make sure the plan accepts IRA rollovers)
alternatively you may be able to direct the entire after tax subaccount to Roth IRA if you choose, and you would pay income tax on the conversion of the after tax sub account earnings
note, you're not moving the "entire balance of 401k", only funds in the after tax sub account. Salary deferral is not distributable. Employer match may be distributable but you would not want to do this I assume, because these funds are pretax, so a conversion would be fully taxable
if you're doing backdoor Roth, and if you end up with rollover funds in traditional IRA via an above maneuver, do not wait until late in the year to do a rollover back into the 401k. There's no sense waiting to do this. Rollover those funds back to the 401k as soon as you can. Or, you could convert the balance to Roth if the amount is small and you don't mind paying the tax.
Now none of this really has anything to do with the backdoor Roth. You'll just want to make sure that in any year you do a backdoor Roth conversion, that your pretax balance in all IRAs is $0 on 12/31.