E
Psalms 14:2-3, The Lord looked down from heaven upon the children of men, to see if there were any that did understand, and seek God. They are all gone aside, they are all together become filthy, there is none that doeth good, no, not one. This is who God had to choose from and then had to make provision to redeem them back by sending his Son to be a sacrifice for their sins. If God, as you think, chose those that he had foreknowledge of their good works, then that would be an "eternal salvation by works". It is not of works, lest any man should boast.
God did not predetermine based on good works. if that was so, the law could save us, and our good deeds would save us and we could take credit.
God predetermined based on his sons work. and who would freely recieve his work (which takes complete humility, which is not something to boast of, but in our world. is something to be ashamed of)
when I chose to trust God. I am not doing a work. or doing something to save myself. I am admitting I can not save myself. and need his salvation. Thus God gets all the credit.