I have one of these in my condo installed in the ceiling and drywalled in.https://www.amazon.com/Dasal-Lighting-2-020-F-RiteLight-Recessed/dp/B016V4GYGM
I have intermittent problems with it, seems like related to the socket which is at the end of the jacketed cable. I can toggle it to get the bulb to work but then when I put the bulb back into the assembly it either won't work or will work for a while and then stop again, until I pull it and toggle it around.
The cable assembly itself does not seem replaceable without removal of the unit (want to avoid). But it looks like I can buy a replacement socket/receptacle.....If I but a new receptacle, it is OK to just cut the old one off the jacketed cable, strip the wires, and wire-nut the new one on to the existing wires?