Can't fit Z-wave switches in box - need ideas

You would be replacing it with an “old-work” retrofit box so unlike the “new-work” boxes that just have open holes, the old-work boxes have a flange you tilt in and it holds the wires. Idea is with a retrofit install the wires are just pulled into the wall and the flanges hold the wires in place. Given you are replacing an existing box your wires are stapled to the stud so you can break the flanges completely and the holes are usually a little bigger than the new-work box.

What I do is first unbundle all the wires, marking them of course so I know which is which. Then I get a flat head screw driver and put it between the box and the stud and open it up a little so I can get the hack saw in between. Then I use this hacksaw I bought from Home Depot that is basically a handle that holds the saw blade:

Once both nails are loose, then you can start pulling it out while pushing your wires through the holes. Then you just install the new one.