Well I would just do this with section starts and parent pages. Wouldn’t that work?
You said: “At the bottom of each page, I want it to say, for example, Section IV, subsection D, page 3 (or 4 or 5, etc.)”
Start a new section at the beginning of Section IV, set it to start on page one. Start another section when subsection D starts (assuming that subsection needs to start at 1 as well), set it to start on page one as well.
For the pages in Section IV (before/after any subsections), you’d create a parent page with the text “Section IV, page” in a text frame, and add the current number placeholder. Apply that parent to the Section IV pages.
For the pages in subsection D, create a parent page that has “Section IV, subsection D, page” in a text frame, and add the current page number placeholder. Apply that parent to the subsection D pages.
For pages in a Section that pick up after a subsection, apply the Section parent page. You’ll likely have to start a new Section and manually enter the page number there, or use the method David referred to in the article.
Wouldn’t that work?