Sounds to me as though your daughter has a couple of possible issues. One: she may be having growing-up issues - not quite sure if she's ready for that next step; Two: There is definitely a control factor at play here. In other words... the 'accidents' are deliberate.
Considering the first issue, since she was barely three, the family's focus has been on a new baby. Even children who act lovingly toward a new sibling can still harbor feelings of resentment or displacement. Your daughter may well be trying to re-establish her place in the family. Make sure you are giving her plenty of "just you and me" time without interference from taking care of the new baby.
On the second issue, the control factor, the problem is not just with your daughter but with the whole family dynamic. You open your question with the statement that she is a very smart little girl but then, later on, you say you 'believe' she can do it. You 'believe' she can? She is four years old! Not so very many years ago, most children were potty trained by the age of two, two and a half at the latest. It's a mental process more than a physical one. She learned to recognize the urges to pee and poop a long time ago and connect those feelings with the actual process of elimination. Unless she is physically handicapped, of course she can. She is old enough to go potty at ballet class but all of a sudden, when she gets home, she forgets how? You know she can. She has already proved she can go to the potty whenever she wants to. So what's with peeing in front of the telly or pooping under the table? These are deliberate gestures and she is telling you something. Wow, is she ever telling you something! She's in charge and you cannot make her do what she does not want to do. (You'll want to change this, 'I'm in charge' pecking order soon because it will only get worse!)
Now, your daughter may not fully understand the full process of what is going on, but she is learning how to control you, one step at a time. And it's working great... for her. Whenever she messes herself, she gets a reaction out of you. You yell, you cry, you beg, you bribe, you cajole, you scold, you withold. Doesn't matter to her. For those few precious moments, she has your undivided attention.
Since nothing you've tried so far has worked, maybe it's time to try a new approach and flip the result of her conduct.
First of all, give her plenty of positive attention and personal one-on-one time, just the two of you. This will help her feel more secure about her place in your new, two-child world. Take time for a "girls' lunch date" or something for just the two of you where you can interact as opposed to ballet or something of that nature where she is involved and you are just watching from the sidelines. At home, make special time for coloring, baking cookies, or something of that nature, even cooking dinner together ... things the two of you can do together but in which the 3 month old cannot participate. Keep this seperate from the potty training issue. Don't make one contingent on the other as this would give her another aspect of control.
Next ... on the issue of potty training. At this point, it's not really a matter of 'training' as such because she already knows how to go to potty by herself. She just chooses not to do so at home. So, if that is her choice, she must deal with it on her own. Ignore her acting out and, if she wets herself or poops in her pants ... well, that's her problem. If you notice she is wet or she smells and her panties or Pull-Ups are 'loaded', don't say anything. When she comes to you and tells you she has wet pants or she pooped, simply point out that it is no longer your job to clean up after her messy drawers and she needs to go change. (I guarantee she will not want to linger in those dirty undies for long and, once you establish that you are not going to change her and clean her up, she will do it for hereself, albeit reluctantly.) This of course will lead to dirty britches in her room so you will want to take the next step with her (and another project the two of you can do together) - as someone already suggested - laundry. She will need to learn to clean up after herself and that means at least helping with the laundry that she, herself, created.
There is more at play here than merely potty training or being made to clean up after herself, though. There are a lessons being learned - on both sides of the relationship. You are teaching her to be responsible for herself and that her actions have consequences. Positive actions beget positive consequences and negative actions beget negative consequences. She will be learning to be self-sufficient. And she will also be learning her place in the family - which does not include being head of household. You, on the other hand, will also be learning ... how to exercise your position as head of the household. If you learn how to deal with control issues now, it will go much more smoothly later on. You and your husband need to clearly establish the 'pecking order' in your household. When a child is four, there is no household democracy. It's a dictatorship. You and your husband are in control. You make the rules; she obeys them. As she gets older, of course, she can have more latitude in expressing her opinions on family issues but, until then, she is the people, you are the government.
You may even want to sit down with her and explain, in simple dialog she can understand, the change in government.
As soon as she is convinced of your resolve and that she will, indeed, be held responsible for her actions, she will make the necessary changes.