In the mainstream universe, I have nothing on who has the stronger moral code, so we’ll have to go to alternate universes. The fighting game “Injustice: Gods Among Us” would say that Batman has the stronger moral code. Long story short, Superman kills his wife and child after Joker poisons him with kryptonite-laced fear toxins. This sets off an explosion linked to his wife’s heartbeat that destroys Metropolis. Superman snaps, kills the Joker, and starts taking over the world to establish order. Highlighting Superman’s state of mind here would be sociologist Robert Michel’s Iron Law of Oligarchy. This theory states that, for organizational leaders, maintaining the organization becomes an end in and of itself–leaders will prioritize the survival of the organization over its doctrine. In this case, Superman has abandoned his moral code in favor of literally having more people survive. Furthermore, Superman starts ignoring fellow heroes, like Flash and Captain Marvel who caution him about his methods.
Batman, on the other hand, doesn’t break character after witnessing similar events, and spends most of his time trying to prevent Superman’s new world order instead. Point Batman.
If you feel I’ve made erroneous claims, feel free to dispute below.