This is now done via:
https://github.com/discourse/discourse/commit/536cef86f4d0a3526d33fd3feb54f03bead7fdd4
We no longer carry post ids in memory and the rebake task can be resumed by running posts:rebake_uncooked_posts.
One caveat here is that the resume task will not rebake posts in reverse order (i.e. the sort order will be id ascending).