Migrate a CSV into two entities with reference
It's fundamental to how the migration process works that it processes one item being written at a time. In this case, since it's sentence entities that are being updated, it needs a migration that processes one sentence at a time. The layout of your CSV here is not well-suited for that, and to work directly from that CSV would require significant hackery. The best approach would be to either generate your CSV in this format in the first place, or have a preprocessing step to put the data in this form:

chapter,sentence,headings
1,1,heading one
1,2,heading one
1,3,heading one
1,4,heading one
1,5,heading one
1,6,heading one
1,7,heading one
2,1,heading two
2,2,heading two
2,3,heading two
2,4,heading two
2,5,heading two
2,6,heading three
2,7,heading three
2,8,heading three


Then, you'd have a migration with source IDs chapter and sentence, setting the heading for each sentence from the headings column.