In an ideal world - laws would be perfect. Ours isn't an ideal world, never was, maybe will become one day. Same with the world of D&D. (We still have to work to remove bad laws, fix others and keep them updated; laws are still needed)

Thus being Chaotic Good is the best choice, except when a law is good or an authority is right and following isn't a mistake; also when doing unlawful acts are needed to stop or prevent a larger evil. Sometimes only a Chaotic Evil can stop an evil. That's why only the consequences -- of our choices & actions -- and their wide reaching web of influence, can define, if our actions were Good or Evil. When we act, we can have the best motivations, and still can end badly, because we can't see the future. Even when that is revealed, we can see that Good was just a Lesser Evil in fact, because there was no way to achieve more.

So the game can't show which actions are "Good" or "Evil" without spoiling the endings (of those actions at least), but can define what is "Lawful" or "Chaotic", though without the "Good" or "Evil" parts, their meaning is just knowing that trespassing could trigger an immediate action (such as being chased by guards) and obeying could improve your relationship with some character(s), nothing more.

The alignment system can't be a moral dilemma in it's current form, that's why they lead to "huge discussions about "Why is this action lawful?" or "How can this be good?" as @Madscientist noted in above post, because thankfully the players feel that the system is wrong.

Can this alignment system be "fixed"? Of course, just these can't be shown next to the choices, at least the "Good & Evil" variants not, as I explained above, unless we want major spoiler beacons at every step.
But they could still be part of the story -- and I think they should be a major part of the story, because these give meaning to any major choice. Just can't be visible during gameplay if we don't want spoilers, otherwise can be there as optional feature, as an easy mode (meaning in the story part, making easy to pick the best choice every time)

They still need to be correct: Good really be Good, based on the consequences, and nothing else.