The primary reason why wood trim is a poor idea for use with stucco is because stucco has a tendency to hold moisture in its uneven surface. When this moisture comes into contact with wood, it eventually rots the wood, causing further structural issues. Even with a good sealant between the wood and the stucco, moisture problems are inevitable, and they cause serious problems that spread to other areas of the home.
Instead of using wood trim on your stucco home, use foam trim instead. You can fashion foam trim to look like wood or plaster trim; and because it is made out of a synthetic material, it will not rot the way wood trim will. It also has the advantage of being light, and simple to install. While special equipment is required, you can install foam trim in an afternoon.
To install foam stucco trim, use a standard disposable wood saw or a power saw equipped with a masonry blade to cut the trim, and a basic silicone adhesive to stick the trim to the window. Latex caulk is used to fill in the gaps between the stucco and the trim, giving you a tighter seal and a professional look.
After you've installed foam trim, you can paint it using an acrylic paint and a paintbrush. Give the trim two coats of paint, allowing it to dry thoroughly between coats. You may choose to leave the trim as it is, creating a look that is more natural and which suits a plain stucco surface very well.