Context, context, context. The ‘works’ in Ephesians were works under the Jewish Law. Note how St. Paul speaks of himself as being as ‘entitled’ by works as any other Jew, being circumcised on the 8th day, and so zealous for the JEWISH faith that he persecuted the Christians. Christians are not under the Jewish Covenant law (which is why Gentiles were not required to observe Jewish rituals such as circumcision), and so those ‘works’ would not justify.
Remember, when Jesus speaks of the judgment of the 'sheep and the goats", He does not say, “You confessed me with your mouth” or “You had faith in me.” He says, “I was hungry and you FED me”, “I was thirsty and you gave me drink”. Those are works but they are as it were living faith or faith in action. It is the faith that justifies but without the works the faith is dead. It’s as much a mockery as the Pharisees who claimed they ‘honored their mother and father’ but refused to provide for them in their old age by giving their money in a huge parade of ‘honoring God’ instead. Kind of like the “God alone” idea carried to extremes.
With Christ’s sacrifice for us, He shows us how the Jewish law ‘foreshadowed’ Him and His work. Obviously without Christ, no ‘work’ in and of itself was enough to ‘justify’ a person. . .but equally obviously, since works were praised in so far as they were done for God, they weren’t going to be jettisoned. We ‘cooperate’ with Christ; we don’t just sit back and blithely assume that ‘He saved me, all I have to do is at most refrain from doing something bad’. That attitude is like that of the servant who buried his talent. He didn’t deprive his master of the talent–but the master required MORE than just having his talent handed back to him, didn’t he? The more is the works. . .but the servants got the talents FROM the master to start with.