There was a Challenge a while back for reading ‘stanzas of a file’ which is very similar to this case. Several solutions at Relevance Challenge December 2019 BONUS: Parsing Paragraphs (answer provided)
I should be able to take a look a bit later if that doesn’t help.