If mass of an electron , increases by absorbing a photon particle ; then we can very well make a conclusion that , " photon is constituent of electron " .
I have thought about the underlying implications of both, the photon contributing to an increase in the mass of an electron bound within an atomic structure and the idea that rather than increasing the electron's mass it changes the total energy of the atom in some way that is reflected in an increase in mass for the atom as a whole.
In the first case it requires the we accept that while a free electron seems to have a fixed mass and is "a fundamental" particle on its own, when bound in or to an atom, its mass may not be fixed and it may not be as fundamental as we think.
In the second case the discussion leads to an assumption that kinetic energy of any kind may be equivalent to mass. An argument that leads to the idea that an object's intrinsic heat contributes to its mass, while we have independent evidence that gravity which we can connect directly to mass, is not affected by an object's kinetic energy associated with velocity.
That discussion runs like a revolving door. I have been moving more toward the opinion.., and it is only an opinion, that the answer to this question lies within understanding the relationship between QM or QFT and GR. There seems to be something going on at a fundamental level we have yet to fully describe and understand.
The question you ask above, is reasonable.., and it challenges significant fundamental assumptions and conclusions, currently represented by existing theory. The question suggests that an electron may not be a fixed fundamental particle, as described by the standard model. I do not know the answer. All I can say is that I ponder some of these same issues. Perhaps, this is a reflection of the limitations of my knowledge in some of the involved areas. Perhaps it represents aspects of those theories that require further clarification. I don't know for certain which.
I can say that I do believe there is a relationship between mass and energy, that cannot be described in a completely equivalent manner. Does the mass of an electron increase as it absorbs a photon or does the dynamics of the atom change in some way that represents an increase in mass? I don't know which is the true answer, or if they both have some merit.
After all of this I can say that I do accept the equation E = mc^2, does represent a fumdametal association between mass and energy, where the mass we are discussing is an invariant rest mass equivalent to both inertial and gravitational mass, and the energy involved does not include "all" energy that may be associated with mass at macroscopic scales. IOW E =mc^2 does not include kinetic energy associated with velocity. My opinion, as I have no credentials to lend greater merit to the discussion that that of opinion.