Replace the pressure regulator too. And get the ball valves with sweat (smooth bore) connections on both sides.
After you shut off the water from the street. Wire brush the top and bottom elbows to remove the paint. Then heat both top and bottom to remove assembly straight out in one piece. Not top then bottom.
Propane might do the job, but a little hotter gas(Mapp)will make your life easier. The trick is to heat fast and get out. You don’t want to cook the seals in both the valve and regulator.
Emery cloth or scotchbright the inside and outside of all new parts, paste flux, and acid core solder. Heat one side and apply solder to the other. At the correct temp, it will flow around easily. Not too much or it will overflow. Just a dab or two of the solder is all it needs.
Preassemble all parts for perfect fit before soldering.
If the pipes are still draining a bit of water, stuff a wad of Wonder white bread into the pipe. No crust. It will block the water long enough to dry and solder. Then will open the closest outside bib to blow it out when finished.
Turn water back on slowly to avoid ‘slamming’ and possible creating a new leak.
Set the water pressure to about 60psi. Makes it easier on the dishwasher and water maker valves. You won’t notice any difference in the shower.