You searched for:
“agathism”
The belief that all things tend towards ultimate good: Agathism, a doctrine stating that everything ends well, is distinguished from optimism which holds that all things are now for the best.
Agathism is a system that recognizes the existence of evil, but holds that all things tend toward good.
The idea of agathism is the ultimate triumph of good despite any evil conditions or methods.