This makes the configuration much complicated. Unless I tried I cannot give a some confirmed info.

First, you can refer to Switch Documentation [Old OpenWrt Wiki] for general vlan configuration. In this page it maps each port to one separate vlan.

Then you can map multiple vlans for one port, need to put a “t” for tagging.

config switch "eth0"
   option vlan0 "0t 5"
   option vlan1 "0t 5"
   option vlan2 "0t 4 5"
   option vlan3 "0t 3 2 5*"
   option vlan4 "0t 5"

third, you can refer to [OpenWrt Wiki] Guest Wi-Fi basics to configure multiple ssids and link them to each vlan. Now you have vlan and multiple ssids.

Finally, you need to assign mesh to vlans. Not sure about the details but you can just try.

The whole thing is tooo complicated. Hope you can succeed.