I wanted to transition a single gang double switch to a two gang box with two individual switches. In the original setup, the top switch controlled can down lighting and the bottom switch controlled a ceiling fan. Both switches were simple on/off switches. The new switches I installed are wifi-enabled/"smart" switches that require a neutral wire and have a slot for a ground wire.
When I opened up the box to do this change, I noticed that I had four Romex cables coming in. Here's a diagram of the original setup. One of the Romex cables (the 14/3 one) had the red and black wires attached to one side of the existing switch. All of the neutrals were wire capped together and stuffed into the back of the box. The grounds for the the bigger (12 gauge) Romex cables were all capped together. The ground from the 14/3 cable was capped separately.
I replaced the box with a two-gang box and proceeded to install the new switches. Here's a diagram of how I wired everything up. The box was really tight with all this wiring, so I used a Wago push connection (6-port)to group the hots and the neutrals together. I added two wires to the capped neutrals and the two wires to capped hots. I connected one of each to each of the new outlets. I then added two pigtails off the capped ground wires and ran them to each switch. When I turned the breaker back on, everything in the room I was working in seemed fine. However, the lighting and ceiling fan and the outlets in the room next door were not working. So, I took the box apart and re-secured all the black/red wires and the neutrals. I flipped the breaker back on and everything started working again with the exception of the can down lights and ceiling fan in the adjacent room. I opened the box in the other room for the switch that controls the fan and lighting (Lutron dimmer switch) and found just a red and black wire stabbed into the back of the switch. I removed these connections and made a shepard's hook with each and secured them back to the switch. I flipped the breaker back on and everything worked.
My concern is that it seems like the wiring coming into the original box that I replaced is related to the power supply to the can down lights/ceiling fan and the outlets in my adjacent room. The smart/wifi switches I've installed are only rated to be used for lighting and ceiling fans. I'm concerned that all the power for both the room I was working in and the room next door are running through these two switches.