There is an assumption here, that "Job's works correspond to his salvation". If you had said "relate to", then that would have been a Calvinistic approach, but the idea of works corresponding to salvation is not a Calvinistic view to begin with.
Specifically, the way Job tries to prevent sin getting a grip on him with wrong desire arising when seeing a woman leads him to vow not to look lustfully on a woman. That accords well with Jesus' much later counsel in Matthew 5:27-28. I have difficulty seeing how trying to avoid doing something wrong constitutes a "work". To not do something is the opposite of doing something (which doing could be a work.)
Another assumption is that "if he did not [avoid thoughts of fornication] he would have no part in God, because he would be wicked by definition". If that be true, then nobody in the world could ever have any part in God! From the aforesaid assumption comes the following one, "This directly links works with justification, and Job lucidly and freely chose to take this course of life ('made a covenant with [myself]') because of the risk of not having done so." This likewise shows how a Catholic view is quite at odds with a Calvinistic one, for the Calvinist would never make those assumptions, leading to those supposed links.
The only way I can proceed to answer the question is to point out what the ultimate lesson in the book of Job is, which certainly links sin with salvation, but from God's point of view, requiring Job (and all of us, I daresay) to be corrected.
This book deals with how sinners view themselves and God, and how God views sinners. Sinners need to learn from this book that our view is distorted by the way we try to justify ourselves, instead of living to uphold the righteousness and justice of God. Job was taught that lesson, God allowing Satan to be the unwitting means of proving the righteousness of God.
Three friends come along to comfort Job in his adversity. Their dialogue shows the view of sinners, which gets nobody anywhere. Round in circles goes the debate - “You must have hidden sins that God would afflict you so.” “No, I’ve done nothing to deserve this (even though I'm not perfect)!”
Only when the youngest man Elihu finally speaks do we get breakthrough. His name means, ‘My God is He’. Fitting, given how he points Job away from himself and to God. Elihu said Job was guilty of sin, but above that, he’d also transgressed. He’d added ‘pesha’ to his sin and multiplied his words against God (Job 34:37). ‘Pesha’ is a step beyond what is proper and acceptable. It is flagrant. It crosses a boundary.
We call it transgression, from the Latin ‘trans’ (across) and ‘gradi’ (go). To walk across a boundary as if it was not there. To deliberately enter forbidden territory, into that which is not our own.
Despite his commendable walk with God previously, Job’s afflictions revealed a state within him that had been hidden until then. But Elihu saw that under God’s dealings, a depth within Job required to be exposed.
Yes, Job was aware, to a degree, of his sinfulness - see ch. 7 vs. 20. He even admitted that he had also transgressed, and wondered why God did not take that burden away from him. But, until Elihu spoke, he had not plumbed the depths. Only after Job is left without a leg to stand on does he finally repent before God, as never before - see ch. 42 vs.5.
What Job then came to understand about God’s righteousness caused him to abhor himself. Only then did Job enter into God’s restorative uplifting. In 7:20 the word used is ‘nasa’. Think North American Space Agency - NASA - uplift. Defy gravity with immense power to hurtle rockets into outer space - up and away. Only God can ‘nasa’ one’s burden of sin and transgression. But he never does that until sinners get beyond their circuitous self-justification to consider the righteous judgment of God against them, and that they deserve nothing but judgment. Then they abhor themselves and repent from the heart, and cast themselves down before God. Finally, Job was brought to that point, and he was restored and blessed far more than he had been.
And, in all this, God was proved to be just, and the justifier of those who truly feel the burden of their sin and repent the way he requires sinners to repent. Not by repeating a formula of words, or agreeing to any creed, or undergoing any ritual. No: salvation is to be overwhelmed with the greatness of God, to put faith only in him to be saved. Now, do you suppose that Satan would have proceeded with tormenting Job had he known that that would be the outcome?
[Taken from parts of “The Burden of Sins” pp.33-36, Nigel Johnstone, Belmont Publications, 2013]
The answer (from my Calvinistic point of view,) is that Job was being brought by adversity to have his faith so refined that he would be transformed by grace, not due to anything he had done, but due to God teaching him the true nature of sin so that he would truly repent.