Dragons to the point of being impossible. Self hosting your outgoing mail means it will almost surely never reach the recipient due to reputation issues. You can, however, set up a respected email provider with your own domain (meaning that, in particular, you can switch providers easily). I have done this myself, using ForwardEmail as the provider.
Having said that, you can self host only calendars and contact, this is nowhere as complicated and maintenance intensive as emails. Or use one of the many nextcloud providers available, the free tier is usually enough for that.