Masses: $m_n-m_p\approx 1.5$ MeV, so the neutron β-decays to a proton, by emission of an electron (0.5 MeV) and a practically massless antineutrino.
But the proton has nothing to decay to, at least in established, non-speculative physics. (So no GUT theorizing here.)
Why? You already appreciated that EM works against this. But $m_d -m_u\approx 2.5$ MeV. Why? nobody knows that.
The competition between QED (your guess) and QCD (the strong interactions: dispositive!) is sorted out in Borsanyi et al 2015 in lattice gauge theory:
The existence and stability of atoms rely on the fact that neutrons are more
massive than protons. The measured mass difference is only 0.14% of the average
of the two masses. A slightly smaller or larger value would have led to a dramatically different universe. Here, we show that this difference results from the competition between electromagnetic and mass isospin breaking effects. We performed lattice quantum-chromodynamics and quantum-electrodynamics computations with four nondegenerate Wilson fermion flavors and computed the neutron-proton mass-splitting with an accuracy of 300 kilo–electron volts, which is greater than 0 by 5 standard deviations. ...
They get it right on the nose:
$$
m_n-m_p = 1.51(16)(23)~ MeV, \\ \Delta_{QCD}= 2.52(17)(24) ~ MeV, \\ \Delta_{QED}= –1.00(07)(14) ~MeV .
$$