Can the Holy Spirit work through such an institution with all its rules and regulations?
The Object of the act can only tell you if the act is good or bad at the foundation, but the other principles can also make the act bad. It really is simple, yet complicated when humanity gets in to mess things up.
One of the definitions of “evil” is the “lack of goodness”. Existence is a goodness itself. God told Moses His name was “I AM” (Ex 3:14). God is existence itself and we get our existence from God. So all things that exist share something in common with God. God shares His very self to all things that exist just by that thing existing. But say there is a hole punched in a piece of paper. That hole poses a lack of goodness in that piece of paper because there is a lack of paper in that hole. The being of paper does not exist in the hole. Therefore, there is a lack of goodness in that paper.
So evil is not really a thing, but an absence of a thing. Evil is not an existence, but a lack of existence. There is quite a reflection we could have with this thought. This is why evil has no real power to create. It can only destroy or hide behind partial truths. It is also why you can never be evil itself. It is a contradiction in terms. By your very existence, you are good. By the very fact that God created you, your being is good. Sin is the lack of goodness in our actions which makes a hole in our soul. A lack of goodness enters our souls. With that lack of goodness, there is emptiness and a deep suffering that only God can mend. The good news is that we get our existence from God. Through His mercy, He fills in our lack of goodness and fulfillment and peace can enter our souls once more.
So when we do an examination of conscience, it is not to see how wicked we are. It is a way to find fulfillment. Confession and Mercy bring healing to the soul. It fills in that hole made by the lack of goodness of our moral acts. It allows us to forget the past so that we no longer have to beat ourselves over the head in regret (Is 43:18&19). In Confession, Jesus “makes all things new” (Rev. 21:5). Amen!