Couple of points.
A 7 speed cassette runs on a different freehub to 8 plus. Its narrower. You may be able to use a spacer but life would be easier if you found a hub meant for 7 speeds as original.
Just a point but maybe you could wonder why the axles are breaking. Agreed modern freehub set ups are stronger but the old type was around for many years without being a disaster. The design wasn't all that bad and the unsupported axle issue is much exagerated. I have never even bent a QR axle even when mountain biking in the good old days before freehubs were invented, Equally my CX bike gets a lot of hammer with ancient hubs.
Not to say don't change but maybe see if there is something causing the breakages. Are you doing a lot of jumps or something?It would be a shame if the problem continued.