Again, the passage in James isn't about Salvation, and the Crucifixion of Christ was more about this
Romans 7:4
Wherefore, my brethren, ye also are become dead to the law by the body of Christ; that ye should be married to another, even to him who is raised from the dead, that we should bring forth fruit unto God.
The whole purpose was to cut the earthly man Adam off the Church and let her marry Christ the spiritual man, new Adam. (1 Cor 15:45)
Now most Christians probably have heard of the
Resurrection of the dead. (1 Thess 4:16, Rev 20:4). Will you say that the thief that died together won't come back to life with these to judge?
Rev 19:8
6And I heard a sound like (...) , crying out: “Hallelujah! For the Lord our God the Almighty reigns.
7Let us rejoice and be glad and give Him the glory.
For the marriage of the Lamb has come, and His bride has made herself ready.
8She was given clothing of fine linen, bright and pure.”
For the fine linen she wears is the righteous acts of the saints
Salvation is free. You're not forgiven your sins by your works, but by grace. But where is forgiveness if one keeps committing sins?
Matthew 7:21
Not every one that saith unto me, Lord, Lord, shall enter into the kingdom of heaven; but he that doeth the will of my Father which is in heaven.
Since the thief had the wisdom to believe in Salvation, I would imagine he would do the will of God if he came back to life.