Consider the reflection approach.
Just create class constructors as private, so you cannot create them in the usual way, and your factory will call this private class constructor using reflection.
Reflection affects performance, but calling this constructor is not a big reflection operation.
Check out this MSDN article to learn more about how to invoke a private constructor using reflection:
But this can be summarized using this piece of code:
typeof(T).GetConstructor(BindingFlags.Instance | BindingFlags.Private, Type.EmptyTypes, Type.DefaultBinder, null).Invoke(null);
UPDATE
By the way, I believe that this can affect the performance and complexity of the code, because you do not want developers to instantiate the class, so using this factory method is not a good reason.
Sometimes good developer guilds are better than any code restriction. I say this because in your case I would implement this factory method with a common parameter T and the same general restriction, and I, if in the documentation documents say "if you want an instance of type T you need to use factory", and some decide not to follow this rule, it was not my responsibility, and with this problem it would be answered: "The manual says that you need to use the factory."
Good habits are better than security code to solve human decisions.
MatΓas Fidemraizer
source share