Hi,
Having looked at this I think the only way of doing this in logic app is through if statements checking each file and calling a separate send email with different combinations of files being added. The issue is that send email doesn't allow for conditional attachments in that if an attachment is added in the UI it will expect to be sent.
Alternatively you could look at triggering an Azure function which will zip the files which contain data and send that via the send email action.
Hope this helps.