Great question! You may need to complete all transactions simultaneously, or have the new owner of the C Corp pay you more but then they would receive the benefit of the other asset sales. It really depends on the fair market value of the ownership stake your retirement account owns. If you sell those assets first and then have a huge increase in business value then the retirement plan may not get their FML out of the business when you sell the legal entity.
To answer your main question, yes you will buy out the ownership of the 401k plan first. So the funds will be paid to the 401k plan in exchange for their ownership. That 401k plan can then be rolled into an IRA, or another other tax deferred retirement account of your choosing. It could be more complicated if you have any employees that have invested in your business through the 401k plan, however. We recommend working through this with your ROBS provider, which should be able to help you close down your business as it pertains to your unique situation.