In order for the intensity of a light source to stay the same, while each lower frequency photon carries less energy, there must be a greater number (per time, per area) of the lower frequency photons in the beam than the original number of higher frequency photons.
As for the second part of your question, I admit that it can be confusing that the power transmitted by E&M waves depends on the amplitude of the wave, while the power transmitted by a mode of a vibrating string depends on both the amplitude and the frequency of the wave. Ultimately this comes down to fundamental differences in the physics of each wave phenomenon.
The energy in a vibrating string is reducible to the kinetic energy of the moving string elements and the potential energy from the tension felt by each element due to the position of its neighbors. So, at fixed amplitude, you can see that you get even more energy if you jiggle the rope faster.
The energy in an E&M wave is a different effect entirely: it comes from the average size of the (squared) electric field in the wave that can do work to move charged particles. At a fixed amplitude, if you increase the frequency you won't increase the average size of the field.
You are thinking in terms of atoms and molecules and you are mainly talking of solid state matter .
Solid state is another quantum mechanical phase, it has lattice structure with much smaller energies than atomic and molecular transition structures. Lattices have vibrational levels which are mainly responsible for the black body radiation solids emit, infrared is also photons.
A rule of thumb with radiation impinging on solids is that if the wavelength is smaller than the lattice dimensions the photons can penetrate easily the lattice, interacting only with direct scatters hence the higher penetration of X rays and gamma rays. Here is an article that discusses the penetration of radiation, X rays and higher.
For glass and optical frequencies there is a good answer here in this site., essentially the structure of the transparent materials is such that the photons pass through without loosing energy in the visible.
For infrared where the wavelengths are large in comparison with lattices or distances between molecules in liquids, the photon can give up its energy in collective excitations at the surface gradually heating up the material.
For ultraviolet, glass, depending on the type, has some absorptive bands, the photon energy transferred at the surface to collective modes or breaking molecular bonds and transformed to heat ( infrared) further in.
So your
Once you reach a critical frequency, however, the photons will begin to be absorbed because they have enough energy to excite the electrons (which is why glass is opaque in ultra-violet).
has small probability to happen until x-ray energies are reached which are the energies of bound electrons, and the link above gives the dependence in a simplified manner.
Best Answer
The short answer is it is the frequency not the intensity of the electromagnetic wave that determines the mechanism of absorption (e.g., molecular rotation, vibration, electron excitation) which in turn determines how strongly the radiation is absorbed and thus the degree of penetration. Then, for a given frequency, the intensity of the wave determines how much energy is absorbed for the given penetration.
As you move upward in frequency through microwaves (molecular rotation) and infrared (molecular vibration) to visible light (electron excitation), you become less "transparent" to the wave, i.e., you absorb the energy more strongly. In the lower ultraviolet range, all the uv from the sun is absorbed in a thin outer layer of your skin.
Then as you move further up in frequency into the x-ray region you become transparent again, because most of the mechanisms for absorption are gone. You then absorb only a small fraction of the radiation, but that absorption involves the more violent ionization events.
For more detailed information on the mechanisms of interaction of radiation with matter see http://hyperphysics.phy-astr.gsu.edu/hbase/mod3.html
Hope this helps.