Yes, the example is only for a single repeater, when nesting fields you would need to keep track of every iteration of every repeater. I’m not sure how you can do that. The indexes would need to be reset each time either of the repeaters starts a new iteration. This is beyond my ability to help here.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users