I need help

My daughter who has been toilet trained since she was 2 has started wetting and pooing herself I don't know what to do apart from putting her back in nappies I am sick of washing dirty undies and I feel like I am failing her as she is 4 and will be going to school next year I am so worried that she will get picked on because she won't stop messing her undies plz I am desperate