I friend of mine brought up a very good point that had me thinking:
"Is God willing to prevent evil, but not able?
Then he is not omnipotent.
Is he able, but not willing?
Then he is malevolent.
Is he both able and willing?
Then whence cometh evil?
Is he neither able nor willing?
Then why call him God?"
Epicurus makes a very legit statement there and I've felt like this myself sometimes because of the awful things that happen in this world.
I've given it a lot of thought and prayer and my answer to Epicurus would be:
God is able to prevent evil but doesn't because of our free will. Everything evil that is happening among us is driven by human choices small and large. In short, it's our fault. Evil cannot work unless we facilitate it by breaking God's Law. We cause harm to ourselves, others, or become the victim of someone else's sin in the process.
Remember we went through the 10 Commandments [link]
and found ourselves guilty? His standard is perfection so breaking one is like breaking all of them as we need to be spotless to exist in his presence. If he were to eliminate evil, he would have to kill us all right now (which he doesn't want to do as he'd rather have us repent).
It only takes a moment to knock something over and a long time to put the pieces back together. It's a delicate operation unless we want him to neatly wipe us out with another Great Flood.
Ever read that parable about the wheat and tares/weeds?[link] It further expounds on this delicate concern. If God were to pull up and burn all the weeds now, some wheat would get tangled up and burned in the process. There are people who are weeds right now but it is destined that God will save them and turn them into wheat.
It's also a matter of legality. Spiritual systems in the Bible are remarkably legal. If you read Genesis, you'll see God gave man dominion over the planet. By deceiving the first parents, Satan practically stole the deed to the planet which is why he is now called the"god of this world" or the "prince of the air". But he got it legally because he got Adam and Even to agree to his lies. It's like signing a contract from a fast-talking con man and not reading the fine print.
To this day, Satan cannot steal, kill and destroy in the physical realm unless he gets us to agree to it. In that same vein, God urges us to pray so that his will can be made manifest on the earth. That is our realm of legal dominion and the things we say yes and no to are very powerful. What we lost in Eden is our connection with God so now we are by default born in iniquity instead of righteousness.
God is the Originator of law, so he won't overturn that contract as humanity consented to it. But he was able to make a loophole by living a sinless human life, taking our punishment and then resurrecting as Jesus, fulfilling the law and making a way out of this binding system. Now the only way to get out of that contract is to die to sin and resurrect in Christ.
So 3 factors Epicurus would have to consider is God's perfect standard (10 Commandments), free will, and the legality of man's dominion.