Hello and welcome.
I have been experiencing the same thing recently: the Apple Mail application randomly crashing, or almost always shen emptying the deleted messages from Trash folder in the Mail application.
I have tried the following troubleshooting steps:
-Deleted all Internet Accounts and removing the Mail folder from my hidden User > Library folder
-Reinstalled High Sierra
-Removed all third-party applications that interact with Mail or System functions, and those that load at startup or run in the background
-Tried another user on the Mac
-Tried it from an external drive running a known-good and fresh install of High Sierra
-Tried it on two other Macs running El Capitan, Sierra, and High Sierra, using all of the steps above
-SMC/NVRAM hardware resets
-Cleared caches, Network settings, etc.
-Restarted cable modem/router, tried different DNS settings, Ethernet and Wi-Fi connections
-Numerous other non-invasive to highly invasive hardware/software troubleshooting and reset steps
I have found that the issue seems to be with my iCloud account only. If I only add my personal email account from my own email server, Mail works fine. As soon as the iCloud account is added as the only or secondary account in Mail, the crashing begins again. This is the same behavior on all three Macs, so it cannot be a hardware or software issue related to them, since they are separate Macs, different OS versions, etc. High Sierra definitely seems to be more prone to the crashing, but it happens with several versions of OS X/macOS. It does not happen when using my iCloud account on a Mac running Catalina.
So, I am beginning to think that Apple may have changed something on their end in the way it syncs Mail between Macs running older versions of OS X/macOS, or their versions of things like TLS/SSL on the server-side, which may be causing older OS/Mail app versions to become unstable.
I will let you know if I come across anything, but there doesn't seem to be a fix at this point. If you want to try any of the troubleshooting I did, please make sure you have a current Time Machine or other backup of your data. I would hate for you to lose anything accidentally.
Stay healthy and safe.
C