I think alot of people get James mixed up. James focus is not on works. His focus is on a claimed faith which is dead. Not real.
What does it profit anyone if they CLAIM to have faith (the focus) But has no works, Can that faith (a claimed faith only) Save them?
As you said, even demons believe, But we see they never trusted God, that's why they are called demons now, and not Angels.
As paul said in Eph 2, Those who are saved BY grace through faith are new creations, and as a new creation, we will do the works God created for us to do.
If we look at it this way, We see works are a byproduct, or a result of our faith and being made into new creation.
Thus James is stating a pretty hard fact. If we claim to have faith, But do not have the works Paul said we would have, Because true faith works, and as new creatures, we act our new nature not our old. Then our faith is dead.
Can that faith save us? No! Never could, never will.
Saying works are required is a danger, and tends to lead toward legalism, pride. And in essence makes james contradict paul. Who said specifically, No works ever had any part in our being made new creatures in Christ