I have gotten UTI's chronically since infancy. It has become a life long habit for me to monitor everything carefully so I can avoid them. This can be too much for a 4 year old, so you may have to play Bladder Police for a while. One way to force the situation is to keeping pumping her full of water (BTW -- Have her strictly avoid sodas and sugary juices...They just provide food for bacteria). If she is always very hydrated she won't be able to hold it for as long. And, even if she does, watery pee is less risky than concentrated pee.
As to cranberry - It is a kidney healthy bevvie but not so much in its cocktail form. I get organic concentrate (Cub Foods - Knutsen's brand). I add a splash to a big glass water and serve over lots of ice. Might be a bit tart for a little one, so try adding a dash of lemonade?
What else? Hmmm...Cotton undies at all time obviously. And as Oprah once said, no undies while wearing PJs. Avoid bubble bath and perfumed or dyed soaps or TP. Try a chemical-free laundry detergent. Make sure she is wiping front-to-back at all times. No caffeine. Make sure she is emptying her bladder completely. Teach her to wait a minute after she thinks she is done and them try to go "just one more drop"...This helps with reflux problems.