Never modify plastic boxes, they are not designed to survive modification.
I use steel boxes, and this here is the most commonly used box. Note how it is 1-1/2" deep. Also available with flanges for mounting on 2x4's etc. So-called 3/8" cable clamps go in the smaller knockouts to hold Romex. They also make box variations with built in Romex clamps and fewer or no knockouts.
On top of that goes this "mud ring" to bring a 1-gang opening through 1/2" drywall. Giving about 26 total cubic inches. The mud ring is also available in 2-gang, though GFCI/AFCI will be a tight fit in the 2-gang version.
Note that with steel boxes, you are required to bring cable ground wires to the steel box FIRST. NEC 250.148. The box must remain grounded even if the switch or receptacle is totally removed.
How do you get grounds to the switch, then? Magically. The switch picks up ground via its mounting screws, and that's it. NEC 404.9(B). How about receptacles? If the receptacle is identified as "Self-Grounding" NEC 250.146(B), and the $3 "spec grade" receptacles are so identified, then it does the same trick. That's a real time-saver, since you now have 1 less wire to wrestle.
Your wires will be within 2" of the finished wall surface at all times, so you will need nail plates in a lot more places. Consider using EMT metal conduit to fully enclose the wires, as this provides nail plate protection inherently. Then use THHN individual wires.