Is a self-sustaining "loop" of economy a thing? Let's have a hypothetical situation with 3 companies. Company A produces a machine part to certain extreme specifications. Their only client for this product is company B. Company B uses these to build gearing systems for very accurate control of a tool. Company B sells these exclusively to Company C. C makes these into manufacturing machines, which are bought by A because they are the only tool that is capable of building the part for B to the required specification.

This is a very simple example, but I think anyone can see how this can be extended to include multiple companies (perhaps even competing ones) where the only reason they exist is because they keep eachother going.

Is there a term for this in economy? Does this happen in reality?
This is not a "sustainable loop" -you neglect the concept of value-added, created by the use of additional factors of production in each company. 

Company $A$ has revenues $p_AQ_A$, with which it must cover all its expenses (including returns to capital).

These are only part of the costs of company $B$, because it also uses additional capital and labor to build the gearing system. So the revenues of company $B$, that have to cover expenses in order for $B$ to keep going, and given that it has purchased $Q_A$ units from $A$, is $p_BQ_B &gt; p_AQ_A$.  

These in turn, represent only part of the costs of company $C$. With the same reasoning, we end up with $p_CQ_C &gt; p_BQ_B &gt;p_AQ_A$. Not that the number of machines build by $C$ are the number of machines that $A$ demands in order to produce $Q_A$.

Under the described loop, company $A$ must now pay $p_CQ_C$ in order to do its job (plus any other costs for the labor and any additional capital it may be needed). But since $p_CQ_C &gt; p_AQ_A$, this will mean that company $A$ will have losses, even before paying for the other factors of production it needs to hire. Hence, the loop is not sustainable.  

A possible (misguided) objection ¨


  "But $p_CQ_C$ represents an investment for company $A$, it is not
  an operating expense"


Essentially this objection implicitly assumes that with $Q_C$ machines in hand, company $A$ will be able to produce more than $Q_A$ product units. But if this is the case, then after the first purchase, company $A$ won't demand more machines from $C$, hence $C$ won't demand additional gearing systems from $B$, hence $B$ won't demand any additional product units from $A$, and so any remaining productive capacity of the $Q_C$ machines will not be used. 
If this objection does not assume the existence of this additional capacity, then the $Q_C$ machines will fully depreciate in order to produce $Q_A$ product units -and then, there may be initially classified as "investment", but at the end of the production cycle of $A$ they will be recorded as "depreciation charge", i.e. a bona fide running expense (which is what they are, since they fully depreciate).

I would suggest to study Input-Output models of an economy.