As the message says - this is an internet connection problem. I don't think there's much I could do to fix this - Diarium already does re-try the download once in the case such a problem occurs. I could increase the amount of re-attempts, but I am not sure how much this would actually help. Does it always happen at the same time (at the same amount of downloaded attachments)? How often did you try?
I just tested the download of an entired database with 3.000 attachments on an older Android devic (Android 9) and it worked without issues.