WhatsApp’s encryption is based on the same source code as Signal, the end-to-end encrypted private messaging app highly regarded by cybersecurity experts. Only the intended recipient of a message can decrypt its contents, so not even Facebook or WhatsApp can access your conversations.
That being said, WhatsApp does make some minor compromises in security for the sake of convenience. When you change phones, for example, your encryption keys are renegotiated so that you can still access messages that were stored on your old phone. That renegotiation opens up a vulnerability that could allow someone at Facebook to read a user’s messages.