Do leg exercises! My son was terrible for struggling to poo... And we used to do bicycle kicks and crossing the legs across the body and rotating the legs pushing gently on the belly to straightening them to the back to the belly and then rotate the other way... Do that for 10/15 mins and 8 times out of 10 he would poo within a hour!
It is possible that he’s constipated, but it’s also extremely normal for breastfed babies to go days without pooping, even a week. With your baby getting formula on occasion, it can still be normal for him to go a few days without pooping. Baby poo is so weird. Multiple times a day is normal, but so is once or twice a week🤣
My daughter's pediatrician said that she could have 1 oz of 100% fruit juice for each month of their age once a day. He did recommend starting with half of that dose. It's worked really well so far. I would double check with your pediatrician first, though.