"Energy = mass" is sadly misleading. Photons have energy, but an individual photon has no mass. This isn't a contradiction. A more complete statement is something closer to "energy = mass + momentum" (although even this isn't strictly correct, but I don't see a need to be more precise in this conceptual discussion). Gravity is sourced really from energy,...
Really, the whole points of my posts is to explain that thinking of momentum as mass times velocity is unhelpful -- and, indeed, wrong -- for photons, so I'd encourage you not to do that.
It is in Newtonian mechanics. Changing the definition of momentum isn't possible as force, mass, acceleration, and velocity are all part of the same equations. Change one, and you change them all.