We typically leave off one of the stiles. Stuff the cabinet into the opening. Place the stile up against the cabinet and scribe it to the wall. Pull the cabinet out. Glue and pocket screw the stile to the box.
We glue and pocket screw the frames to boxes anyways. So the pockets are already in the side.
We've done a stupid number of beaded cabinets this way. Almost always floor to ceiling bookcases.
If you can break the unit into a couple of units you can do a similar thing. Our bookcases are often multiples of roughly 30" shelves. We will build 2 boxes that get screwed together. The stile overlaps the two sides. We assemble them in the shop together as a unit so the beads lineup perfectly. Glue that stile to one of the cabinets. The join happens at the stile rail joint. Similar deal. Scribe the left cabinet. mark on the wall where its final location will be. Pull it out. Place the right unit. Offset it the correct distance and scribe. You should be able to push the other cabinet into the alcove and fasten them together. Two perfectly scribed sides with a hidden joint in the frame.
The fun ones are hutches. You have a lower with a counter top and an upper. All scribed on both ends into some terrible sheetrocked alcove.
I convinced the best builder we work for to pack the studs with 1/4" luan so that recess was tapered inward. Often the sheetrock corners are the closest points.