A static DI Factory is a Service Locator, and a Service Locator is an anti-pattern because it will make it difficult to reason about your code:
- It breaks encapsulation.
- It violates the Interface Segregation Principle.
- It makes it more difficult to spot violations of the Single Responsibility Principle.
- It makes object composition more difficult, because it hides the composition context from the Service Locator.
- It breaks the Hollywood Principle.
The only advantage of Service Locator is that it's slightly easier to understand than Dependency Injection. However, DI isn't that hard to grasp once you get over a few conceptual hurdles.
The relationship between IoC and DI is that DI is a special case of IoC.