See also How do I install electrical through stucco which deals with the old work situation.
What are the best practice products and procedures for installing an exterior light, on a wall that will be re-stuccoed?
While I am looking for a general answer, I do have a specific wall in mind. This plastic box is installed on top of a circle of plywood with one screw. The paper is cut around the box and caulked to the outer layer. The box is not waterproof itself. I have been unable to find a stucco depth waterproof box: