Are you familiar with kangaroo? This is kind of an origami problem and there are many example floating about. If you know which parts should finally connect, id say an example like yours will work.
How flexible the material is will depend on how it’s meshed, and the strength given to any bending goals, or edge length goals.
I’d be surprised if @DanielPiker doesn’t have an example for a similar problem already.
If you Can upload example geometry you are much more likely to get direct help.
Here’s a definition that generates a triangular mesh of the surface, including a little script to make sure certain internal anchor points are included in that mesh, then uses Kangaroo to pull these anchors together.
You might find in some cases you need other goals to make sure things buckle in the direction you want.