merge multiple email accounts in single view in mutt

This sounds like perfect use case for notmuch. With notmuch You can use virtual mailboxes in mutt (kz patch, but I'm not able to find it on the project site) or natively with neomutt. I would say neomutt has better notmuch support.

Mailboxes must be synced localy. So You need other tool for syncing e-mails like offlineimap, isync or similar tools. You will probably want to set up post-sync hook for tagging messages (because tags are good for querying). I would recommend to sync only All mails and let notmuch to take care of everything else using tags and queries.

Notmuch creates a xapian database. You define Your mailboxes using notmuch queries.

To "separate" Your accounts You can bind keys f.e.: F1 - personal F2 - work, F3 - school, F4 - … to source different config files.

Notmuch config:

[database]
path=/full/path/to/root/of/your/mailboxes
# so Your directory structure will look like this:
#/full/path/to/root/of/your/mailboxes/{personal,work,school}/{INBOX,trash,…}/{cur,new,tmp}/

[user]
name=Your Name
[email protected]
[email protected];[email protected];…

[new]
tags=notify
ignore=*.json;*.json.bak;.lock

[search]
exclude_tags=deleted;spam;trash #if You want to exclude some tags from query results

[maildir]
synchronize_flags=true

[query]
junk=tag:trash OR tag:spam OR tag:drafts OR from:@linkedin.com
lists=tag:Newsletters OR tag:Maillists
personal=NOT (tag:Work OR query:lists OR query:junk)

I use it that way. ~/.neomutt/neomuttrc.account-personal ~/.neomutt/neomuttrc.account-work ~/.neomutt/neomuttrc.account-commmon

in each of those files I have per-account settings (signratures, PGP, S/MIME keys or even colors) + at the end of per-account config files there's source ~/.neomutt/neomuttrc.account-common with status_format and other common configuration.

Small recap:

  1. offlineimap / isync / other tool - for e-mail synchronization
  2. offlineimap post-sync hook - to tag messages after synchronization
  3. notmuch - for tagging and querying and virtual mailboxes
  4. mutt / neomutt bindings for switching accounts or changing per account configuration

PS: It's easy to use once You get used to it. You need to change Your mindset. It requires some time to configure everything exactly as You want to. Don't give up, it's worth the time invested :)