I'm not sure if this is more of a financial or legal question. Let's say there's some tension in my marriage, and my wife and I would like to set aside money in a way that, if we were to get a divorce, it would be somehow held for our daughter's education and neither of us would be able to deplete it? Ideally, she would also be required to use it for educational purposes and would not have the option of spending it frivolously. Is there any mechanism that could achieve this, something like a trust?
I don't know of any financial account that offers that kind of protection. I'm going to echo @Brick and say that if you need that level of restrictions on the money, you should talk to a lawyer. Your only option may be to setup a trust.
If you are willing to go with a lower level of restrictions on the account, a 529 plan could do the job. A 529 Plan is an education savings plan operated by a state or educational institution designed to help families set aside funds for future college costs. It will be in your daughters name, and has the benefit of being tax advantaged, unless its used for non educational expenses. Since your daughter is a minor, there would have to be a custodian for the account that manages it on her behalf. The penalty for using it for non educational expenses might suffice to keep the custodian from draining the account, and I believe the custodian has a fiduciary duty to the account holder, which would open them up to lawsuits if the custodian did act in a way that was detrimental to your child.