"The child drinks three glasses of water."
Translation:La infano trinkas tri glasojn da akvo.
No, it isn’t. You do not use the accusative by chance, but according to the rules. With prepositions only those who can give location and direction take the accusative with the direction.
en la domo – in the house (location)
en la domon – into the house (direction)
The preposition da (of) is not among them and never takes an accusative.