I’m totally confused as to why you would want to even remove the switch.
And all your splices have to be in accessible boxes. Absolutely no wires twisted together inside a wall.
All of the splices are in approved j boxes, stripped to an appropriate exposure, and twisted with gauge appropriate caps. Grounds are twisted and crimped with copper sleeves. Not my first rodeo there.