I have a similar, but simpler approach in my DO helper package: https://github.com/lambrospetrou/dur

I have a similar, but simpler approach in my DO helper package: https://github.com/lambrospetrou/durable-utils/blob/main/src/do-sharding.ts#L154-L187

That's a bit specific to the specific class logic, but it does the same thing as yours, limit processing among N things with a given concurrency. Check it out in case it simplifies anything on your side.
I didn't know about the p-limit package you used though, so maybe that's enough already.
Was this page helpful?