@Manasahr I have already answered a similar question your coleague recently asked:
https://forum.aspose.com/t/table-and-figure-footnotes-should-appear-below-the-figure-and-table/257156
The similar situation is here, there are no footnotes in your document, there are in one case a row with table header and content that is considered as footnotes in another case there is a set of paragraphs above the paragraph with shape. Since there is no pattern that can be used to identify such paragraphs, I do not see an ability to provide you an universal solution for this task.