Howdy @anastas10s ??
Thanks for reaching out! Could you elaborate on the target workflow for the customer, please? There may be a plugin (combination, even) already available for covering that functionality; unless you prefer achieving it programmatically. In which case:
I was told how to achieve what I wanted differently: use shortcodes that the Reusable Blocks Extended plugin adds to custom blocks.
In essence, this solves my problem, although it requires keeping fragments, often created for one-time use, in a separate place.
If there is a better solution, I will be glad.