I think I may have cracked it!
Once I'd worked out I needed to instal millisDelay into the library, the changes were actually quite simple.
I've also reduced the current sample period by a second - all good. The millis overflow issue shouldn't affect it either, as the workbench is switched off...