You obviously have a good understanding of the underlying technical issues here, so thank you for a relevant discussion.
I am now considering (although I am loath to add options and dialogs that many users will be confused by) adding a warning and an option to cancel an ongoing operation. There are still edge cases though.
It’s not reasonable to stop a person from opening an encrypted file, or encrypt a single file, while a larger background operation is in progress. The ongoing process can be time consuming because of the size of a single file, or because of the number of files, or both.
I will think about this… Thank you!