One possibility is to use a Blend.
Select both your shapes and click Object > Blend > Make
then Object > Blend > Blend options
Under Spacing, choose "Specified steps", set it to something high like 500 steps
However, the above comes with disadvantages:- It creates 500 individual shapes, and even if you Expand then Unite them with the Pathfinder, you'll still have over 1000 anchors, and Simplifying doesn't really work either.
Another possibility is to do it the way you have already done, but to edit the position of the anchors of the rectangle manually using the Direct Selection Tool (A), so that they intersect with the outermost edge of each circle, to reduce the humps that you can see in your example.