Webmail server with multiple mail accounts - eviltoast

I like using thunderbird to have all my emails in the same place, in a unified inbox. This doesn’t allow me to access my inbox on my phone etc though, so I’m looking for a FOSS way to solve this problem.

My idea would be to selfhost a website, like a webmail site, that has the functionality of connecting to different mail servers and unifying the inbox to get all my mail in the same place. Should be accessible by android phones and iPads.

Is there a better way to do this? Maybe with nextcloud? If anyone has an idea, let me know.