How to inserty custom background or second plan footage using dynamic mask in After Effects? I need to change the sign contents in the clip

The problem is that in some parts gets "blocked" by walking in front of it Minions. How would you solve this challenge?

Screenshots:
Something like that is solved with "Rotoscoping". After Effects has several features that make this process easier. F.e. the "Roto Brush", you can find a tutorial about that here:

                
            
https://helpx.adobe.com/after-effects/using/roto-brush-refine-matte.html

Then you will have to track the translation and rotation of the sign as its carried around. When you have that you can add a layer that follows the movement of the sign that holds your new content.