For do until:
The output of the stat module is documented in the documentation page of the module. But you can look at what is available in general by registering the output of a task and then putting debug: var=variablename as the next task.
I haven't put any error handling in my example playbook so you would probably have to add another task in case the loop times out. The values I chose were OK for testing but you will need to find proper timings for your use case.
I chose to not use to look into the stdout of another task because you specifically asked to look if anything still appends to a file. If you have a log entry that tells you when your processes are finished I would recommend using that as an inidcator instead og the mtime.