My son had a inguinal hernia opperation when he was 1, he is not 5 but does not seem to know when he wants to go to toilet. Could the opperation have meant he does not feel then need to do so. Its not until he has dripped a bit that he does at the moment.
Sometimes IH hernial surgery we can compress a nerve, or there be stretching of nerves supplying to bladder, these are temporary phase as patients usually recover on its own.