This antinomical understanding (contradictory opposites that are both true) has its origins in Kant's work[0], which was of course picked up by Freud, consciously or not.
Its not "good in some ways and bad in others," its the idea that every action is fully mechanical and that every action is fully freely determined can both be argued to be true within the laws of cognition, even if they are completely opposed to one another.
This may be of interest to you, a few years before Kant with “Syādvāda” going beyond the binary implied by contradiction alone: https://en.wikipedia.org/wiki/Anekantavada
[0]https://en.wikipedia.org/wiki/Kant%27s_antinomies