Since the e-mail Client ( Apple Mail Application ) is configured using IMAP, it will reflect that which is appearing when you log into the Web Interface of this e-mail Provider.
As you have mentioned, the missing or disappearing e-mails are not On the Server - the same would appear in Apple Mail Application.
The Sent and Trash messages, again because they too are Reflecting the same on the Mail Server, they ( Sent and Trash ) would Count as part of the E-mail Storage Capacity offered by the Mail Server.
Personal Experience.
Have an Aunt of 95 Years old and e-mail from time to time. They kept Bouncing back. Come to find out, here e-mail Server was also using IMAP but being 95 and a Pack Rat, was keeping every single e-mail received.
Long story short - she had close to 20,000 e-mail in various folder including Trash and Sent. The Server had a Storage Capacity Limit of 200 GB .
Needles to say, some serious House Cleaning was required to drop her usage of Capacity below that level.