Is there a term or expression for this besides prerequisite? The main idea to convey is that the topic is spiraling out of control.
In the software development world, there is a humorous term called "yak shaving" that describes a very similar situation of cascading dependencies.
As noted on https://americanexpress.io/yak-shaving/:
"Yak shaving refers to a task, that leads you to perform another related task and so on, and so on — all distracting you from your original goal.
In other words, we want to start some task, but there is something that precedes that one, and so on, ad infinitum.
The internet is full of examples of yak shaving. One thoughtful example that I like is at https://blog.gruntwork.io/introducing-the-yak-shaving-series-247e7f20f81, where the author likens software development to a fractal:
".... when you actually start doing the project, you begin to zoom in, and realize there is quite a bit of detail hiding in every corner. And each of those details seems to have more details attached to it, and each of those has more, and so on."
Bringing this back to your example - where subject A has a prerequisite of B, which in turn has a prerequisite of C, etc - I would refer to it as an infinite regression of dependencies ... or simply as yak shaving if you want the humorous term. :)
I've worked at a number of software development companies where it would be called:
going down a rabbit hole
To enter into a situation or begin a process or journey that is particularly strange, problematic, difficult, complex, or chaotic, especially one that becomes increasingly so as it develops or unfolds. (An allusion to Alice's Adventures in Wonderland by Lewis Carroll.)
Additionally, you might describe a specific task as a rabbit hole if you're likely to find those characteristics once you start working on it...
Dependency hell refers especially to software with conflicting dependencies, but can be used somewhat more broadly to refer to pain from prerequisites.
There is a logical expression, which, though not exactly what you are asking, could reasonably be applied to it. I mean the idea of infinite regress
Google.com offers this explanation.
An infinite regress arises when we ask what are the justifications for the reasons themselves. If the reasons count as knowledge, they must themselves be justified with reasons for the reasons, and so on, ad infinitum. The problem of the infinite regress was a critical argument of the Skeptics in ancient philosophy.
Merriam Webster offers the following;
an endless chain of reasoning leading backward by interpolating a third entity between any two entities.
The earliest such chain of reasoning occurs in Plato, or, rather, occurs in Aristotle’s critique of Plato’s theory of forms. Plato claimed that to explain the properties, like just, or beautiful, you had to understand that such qualities are reflections of real entities, JUSTICE and BEAUTY. Aristotle, in his Nichomachean Ethics points out that if this were true, Then in order to understand, for example BEAUTY, we must have to understand a third entity (say BEAUTY and so on ad infinity. This type of chain of philosophical questions is what has come to be known as infinite regress. The argument that points it out has come to be known as the third man argument.
Children subject us to it. when they realise that to every answer you give, they can keep saying “why”.
Your question involves a regress of questions, whether actually infinite or not.
What you describe is actually called a stack overflow in computer science: A stack is a LIFO data structure (last in, first out) designated to manage tasks. When too many tasks come in before they can be handled, all memory available for the stack is full. And bad things happen.