What I have always seen done (only a law student here with little actual experience, so not actually a lawyer yet), was that you put your wishes into the will.

ie, state that you want to leave the kids in the custody of A & B in the event of your death or incapacitation. (you could also specify an express wish that Y & Z never be left in custody of the kids under any circumstance).

And then you would add to this an annexation, where you would include the letter which would lay out your reasons as to why in the event of anyone contesting that aspect of the will. In such a letter there i no such thing as too much detail, so add as much as you can remember. This is for the courts to take into consideration if the need arises.

As for enduring power of attorney, that is something you definitely need to discuss with a lawyer in terms of your situation.