This question is pretty much what I am confused about. However, the answer says that we require local phase symmetry to keep the lagrangian gauge invariant. As far as I can see the argument only works the other way around, i.e. we impose gauge transformation to make the local symmetry work. We can couple the EM field to a divergence free 4-vector.
1 Answer
$\begingroup$
$\endgroup$
Local symmetry is not needed, at least in electromagnetism. We can get away with it because of charge conservation but I advise against it to avoid complications.
See my paper on this: https://arxiv.org/abs/physics/0106078