“Modular/reusable” content and search results

There is a little underknown field in posts database called post_content_filtered. It isn’t used by core (as far as I remember) and sometimes plugins use it to store alternate representation of content (which is more or less what it is intended for).

So in for your use case my idea would be to store content with shortcodes rendered into that field and adjust search SQL to use it for your “containers” instead of main content field.

But really there are multiple ways to approach this, just first thing that came into my head, by no means staple way to do it.