I think all children should learn that their actions have consequences and what you are doing is fantastic! You were not too harsh - you were spot on. Seeing that they understood what they had done and made up for it accordingly the next day shows that it made sense to them.

And good on you for making sure your boys are housetrained!! If only DP's mum had done the same when he was growing up