Meta owns the code. You type messages into a little text box, Meta (the whatsapp app) takes that plain text and encrypts it. There's
no way that they do not have access to each and every single message you type for enough time to collect data on you.
And, given it's Meta, there's no way they are not doing this.