Mac Mail Limits (messages and mailbox size)
The Limit is not something programmed into Mail.

In effect, your Hard-Drive storage and the Performance of your Mac are the only limiting factors, not some count of messages in terms of size or number.
As you already noticed, the app gets really slow with Mails over 100k or even 200k on current hardware (perhaps except the Mac Pro).

It is not recommended having such a big MailBox at all.

How I think it should/could be handled :


Don't go beyond 10k Mails (in your main Postbox)
Move Old Mails into a Mail-Archive


Having your own Server for that helps a lot.
I use a OS X (Mail-) Server  with a Roundcube Frontend and a MySQL Database.
In our company we have a Linux Mail-Server and a Roundcube Frontend with a MySQL DB.
The Server can handle those Mails a lot better than Apple Mail. Also roundcube as a Frontend is much faster when going through severel houndred of thousands of mails.

If you're reaching a Mail-Count of more than 200k, you are probably collecting a decade of mails (unless you are writing a lot).
After 3-5 Years you should store those mails on a Backup Server (Maybe at a different location), safe for nobody to access and safe regarding any kind of loss.