You could try to use a memory-based filesystem for your temporary files. I don’t know how to setup this on windows, however…
I also would like to mention that A restic client written in rust doesn’t write temporary packfiles, but keeps all data in memory until writing directly to the backend.