IMO, you can use wax on glass. Just make sure to buff it off completely so that no residue is left behind.
As for putting wax on black trim, it really depends on the specific wax you are using. I suggest you check with the manufacturer and see if they approve applying your particular wax on black trim or not. Many years ago, I used to use Collinite 845 and 915 carnauba waxes. The Collinite website said to specifically avoid putting wax on the black trim as the wax can stain the black trim white.
It takes extra time and effort to tape off the black trim, and this is one of the reasons I stopped using waxes. I now prefer ceramic spray sealants and ceramic coatings. You can use ceramic spray sealants on all exterior surfaces, including black trim. Not only will ceramic spray sealants not stain black trim, it will protect trim and help keep it looking black longer.
As for the windshield, I have used Technicians Choice Ceramic Detail Spray on the windshield and it works great. Not only does it clean the glass well, it leaves behind hydrophobic protection. Once I am going above 40mph, the water droplets glide off the windshield and I often do not have to use my wipers.