It is hard to set up and you might need an SMTP relay since most ISPs close port 25. But it is feasible.
I have everything at home, including the mail server. The only third party to my setup is a SMTP relay. All on an Odroid H4+. With a backup server on a Raspberry Pi 4 at my daughter’s.
I have been self-hosting my mail server for the past 5 or 6 years with success. Recently my ISP decided to close port 25 so I have to use a third party to deliver my outgoing mail.