Too long for comment:
Why does mail_crypt require generated private key to be stored on the server?
Because as, as the introduction says: "The Mail crypt plugin is used to secure email messages stored in a Dovecot system. Messages are encrypted before written to storage and decrypted after reading. Both operations are transparent to the user."
That transparency is the keyword there.
For an authenticated user, Dovecot must be able to reverse the encryption and that requires the private key.
I thought that the purpose of encryption at rest is to prevent attacker from reading the contents of user's mailbox.
Encryption of data at rest protects against some but not all threats.
The general idea and of encryption of data at rest by a (server) application is that when an attacker attempts to by-pass the access controls in the application and tries to read the data directly from the file-system/disk, that they will be thwarted by the encryption.
I.e. when an adversary or even a trusted administrator does something like: cat Maildir/cur/1659449681.11765_1.mail.example.com
that won't show the clear text message headers, envelope data nor the message body anymore, but only some encrypted gibberish.
I thought that the private key will be stored only on the user's client and emails will be decrypted locally (after downloading them via IMAP/POP3)
Such a solution would either require a (plugin for the) mail client that supports the specific encryption that mail_crypt adds or could only be implemented with a custom e-mail client.
And it would require that the user uploads their public key to the server, before their messages can be encrypted and more.