It could be just typical competitive female thoughts and feelings in D4 that, like many very young girls, cause them to actually compete with their mothers for the love and attention of dad; however, with you two not being together right now, "competing" doesn't seem likely (but who knows with a 4 year old). I'd surmise that your daughter was more likely trying to make your wife jealous and manipulate your wife to get back together with you. It may be an indication that as good as you are trying to make things, your D4 is still feeling overwhelmed by her parent's conflict and trying to fix it, yet she's completely and obviously ill equipped to do so. Your DD4 could also be very perceptive and noticing your modified behavior around mom and projecting (taking on your emotions and carrying your torch). This could be the case especially if she's been listening to you speak to others about your fight for your marriage.
You may want to discuss this with your daughter very briefly. Probably not in relation to her saying anything about "secrets" to mommy. You don't need to call her out or expose her plans but a gentle reminder that she is not responsible for the problems you and mommy are having and that she's not responsible for fixing it either.
Children are narcissists. Everything happening around them relates to them. I know you've been a superbly supportive and attentive father lately but your wife is wayward and most likely failing as the great mother she's been up until this year. Your wife is probably a bit short tempered and inattentive. Distracted by her selfish desires and the typical wayward "it's time I think all about me for a change". Be careful not to speak for your wife because you don't REALLY know what life is like for your dd4 when she's alone with mom. DD4 just needs to know it's not about her. She didn't do anything to cause this and she isn't responsible for fixing it.
btw. If you actually do end up divorced. Your DD4 and you will have secrets because your life, to a large extent, would become none of your ex-wife's business. Just focus on your one-on-one relationship with DD4 and let your wife manage hers.
The internet is 90% complaining and entitlement and I hate it because I deserve better!