Hi @nday,
Thanks for the post.
The ACF resource page contains a tutorial showcasing the process of querying the database for repeater sub field values.
The same can be applied to a Flexible content field since the save format is almost similar.
You can have a look at this tutorial here: https://www.advancedcustomfields.com/resources/querying-the-database-for-repeater-sub-field-values/
I hope this helps.