Is that a problem worldwide or more localized to the US? I am using Signal, Threema, and WhatsApp and never received spam on any messanger, only occasionally via SMS.
I suspect that, a bit like email addresses, being very selective about who you give your "address" to is the most important bit.
Sadly, phone numbers, unlike email addresses, are such a small address space that it's possible to just message all of them.
The only other service/medium where I get comparable (really any) spam is SMS/email.
I've never, and I mean never, have received a spam message over iMessage.