Providing infrastructure that money launders could use, or actually do use, is not categorically illegal. But the law establishes certain obligations to try to mitigate money laundering. There are controls you need to implement, expertise you need to have on staff, a level of sophistication that your AML program needs to demonstrate. And there are enforcement regimes with audits and licensing to backstop all that. It is not a free for all.
I am not sure how you expect to implement any of those without undermining the end-to-end nature of the private communication. Can you maybe explain how this would work in the context of the messaging application?