The security (e.g. passwords, 2FA, etc.) is roughly equivalent between Slack and Discord. In both cases you're hosting your messages on someone else's server.
For privacy, Discord has a bad track record, so as a business, I'd choose Slack over Discord. But I definitely prefer self-hosting communications infrastructure.