I have not read about any Muslim scholar that has talked about this problem you are speaking of, but it is solvable simply.
First of all, the wording in this dilemma is a significant problem. Morally good? What does that even mean? Islam talks about Justice and Mercy. So, I am going to consider justice and mercy as morally good. Justice and mercy are much easier to define. Justice is to fulfill everyone's rights and your responsibilities and rewards and punishments. Thus, true justice is not possible except when you know everything (so as to take everything into account). Mercy is when instead of being completely Just, you skew the action in favor of the other person. Punish them less than they deserve or Reward them more than they deserve.
Allah is All-Just and Most-Merciful. Thus, everything Allah does is Just and He is Merciful. So, we say all that Allah has commanded us is from his Wisdom and for justice and mercy, and following Him is the best way to truly be the most just you can be, as his commands come from His complete knowledge.
Indeed Allah enjoins justice and kindness and generosity towards relatives, and He forbids indecency, wrong, and aggression. He advises you, so that you may take admonition. (16:90)
Some things Allah commands and why they are good:-
Worshipping Allah (Good):
- Allah has a right to be worshipped and praised, and by not doing it you are ignoring his rights and your responsibilities
- Society has a right over part of our money, and giving more is merciful
Killing Innocents (Evil):
- We don't have the right to kill innocent people
If we consider moral goodness justice and mercy:
Allah commands good because He is All-Just and the Most Merciful. So, in a sense, you can see both (i) and (ii) are true. Allah commands good (justice and mercy) because it is good (just and merciful), and whatever he commands is good because He is All-Just and the Most Merciful.