There are some third party tools like PowerShell Pro tools or PowerShell Ultimate (https://ironmansoftware.com/). I appreciate they cost, but if you are a builder of tools for others, they really can help massively!
With the appropriate configuration, your SMTP server could relay to O365, just acting as a forwarder, you don't necessarily have to remove the server. This is very common in use-cases for old devices that barely support SMTP authentication, never mind TLS!
If you are using windows server, data deduplication[1] is available on non-system volumes to do exactly this.
If you're using a Windows client, there is a way of enabling this, but it's not exactly supported, for a variety of reasons.
[1]https://docs.microsoft.com/en-us/windows-server/storage/data...