> Usually the words "blacklist" and "whitelist" are not hyphenated from what I could see, though
Yes, I use blocklist / allowlist myself, without the dashes.
> Sometimes the list is used to block and allow something, but sometimes other words such as exclude and include will be better.
Good example. I agree. Using the most descriptive variant is a good practice then, and no need to fall back to a vaguer container concept.