Try using a combination of a user delegation SAS (at the account level) and RBAC (on per-container level - i.e. for container1 and container3 in your example).
As per https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas "The permissions granted to a client who possesses the SAS are the intersection of the permissions that were granted to the security principal that requested the user delegation key and the permissions that were granted to the resource on the SAS token using the signedPermissions
(sp
) field. If a permission that's granted to the security principal via RBAC isn't also granted on the SAS token, that permission isn't granted to the client who attempts to use the SAS to access the resource. When you're creating a user delegation SAS, make sure that the permissions granted via RBAC and the permissions granted via the SAS token both align to the level of access that's required by the client."
hth Marcin