I decided to derive some equations for electromagnetism in 4d that assume an inverse square law.
φE4 is the 4d electric flux which depends on the distance from the source of the electric flux. Q and q are for electric charge, ε0 is the electric constant, r is the distance, FB4=0 is basically saying that there are no magnetic monopoles although there would be no magnetic poles either, B4 is for 4d magnetic fields, μ0 is for the magnetic constant, FE4 is the force between two electric charges, FM4 is the force between two current carrying wire, I is for electric current, and L is the length of a current carrying wire.
I included magnetism because if special relativity still applies then a charge that is not moving relative to a current carrying wire will experience no force as the density of positive and negative charge will be the same, but a charge that is moving in the same or the opposite direction of the electric current relative to the wire will experience a force because from it's reference frame the some of the charge in the wire will have length contraction while the opposite charge in the wire will have length expansion so from its reference frame the wire has a greater density of one charge than the other. If the charge experiences a force from the wire in it's own reference frame it must experience a force in all reference frames and so from the reference frame of something that isn't moving relative to the wire the wire must have a magnetic field to account for the force between it and the moving charge when from it's reference frame the wire is neutral. While some of the equations that describe magnetism will be different in 4d so long as special relativity still applies there will be magnetism as magnetism is the result of combining special relativity with electricity. In 4d in order to understand magnetic fields it's best not to think of them in terms of field lines as that just tends to lead to confusion but instead it's best to think of them in terms of special relativity.
The "electric flux" is dependent on the distance as that is what would produce an inverse square law in 4d as the force between two charges is the electric flux of one of them multiplied by the charge of the other divided by 2pi2r3 and in order to produce an inverse square law an r in the denominator must cancel out with an r in the numerator.