"The first part is fine, it's the second that can be troubling as it signifies that God permits evil, doesn't it?"
1 John 5:19 - And we know that we are of God, and the whole world lieth in wickedness.
Sure He does.. He uses it for HIS purposes.. to believe otherwise is to say God is helpless over evil..
Not only does God allow it but He ordains it to occur..He is sovereign over all things..
As an example of God ordaining an evil event..only look to the cross which was ordained before the foundation of the world
Evil does not hold God hostage.. He restrains evil..it does not restrain Him
There is also an easy confusion between righteousness with good and unrighteousness with evil.
I’ve found the doctrines of the Bible to address CHAOS, COSMOS, as Disorder and Order/World.
KAKOS, or worthless is also translated as evil, in contrast to AGATHOS, as good, which might be better translated as having virtue.
It is possible to have order in a ‘worldly’ system, as well as one which is righteous (DIKAIOS) in contrast to sinful (HARMARTOLOS) or (ANOMOLOS) lawless.
For example, one might be a member of the mafia, an order of lawlessness, which acts independent of legitimate authority, or there might even be counterauthorities in the mafia, in reaction to corrupt authority (illegitimate judges and law enforcement who have corrupted legitimate authority), seeking to establish order which is good in their own eyes.
IMHO, the best way to begin that study is by first while in fellowship with God, to read Scripture, possibly even performing word studies with a Strong’s concordance, and using internet study tools such as e-Sword to look up corresponding Greek and Hebrew terms, and rereading verses in context with those particular word studies. Above all letting God the Holy Spirit guide your thinking as reading Scripture and those word studies, thereby slowly building faith upon faith, first in the human spirit, then studying to sanctify and build the soul on sound doctrine/faith.