The short answer is: YES, you can do what you're proposing and you'll still have the same amount of space left. You're essentially asking - if I 1) sign up for family sharing, and; 2) upgrade my storage to 200 GB, can I reverse this entire process and everything will be the way I left it.
The answer is YES provided that your storage amounts and your wife's storage amounts are unchanged in your example.
I think there is some confusion on how Family Sharing works. It does not merge your files... it doesn't actually insert your wife's files into your iCloud. It keeps them completely separate. You'll be able to see how much space her files take up by clicking on Manage Storage, but that's it - you won't have direct access to any of her files.
So, it will be a bar graph that will show something like this:
- Photos - 20 GB
- Documents - 10 GB
- Wife's files (family sharing) - 40 GB
You won't be able to see your wife's individual breakdown of how her storage is used -- e.g., docs, photos, etc., just that she is using 40 GB (and she won't be able to see your breakdown either).
If you decide to disconnect Family Sharing, it will simply remove the '40 GB' block of your Wife's files from your account and you will both have to sign up again for paid storage in order to keep your files. But, you'll still have 30 GB in this case, and she'd still have 40 GB, and you'd each be fine with a 50 GB plan.
As mentioned by @Udhy, in order to downgrade, you must be under the allowable storage limit. So in this case, if you were using Family Sharing, you would need to pay for the 200 GB plan as the 50 GB plan is not sufficient for both you and your wife to use. And, once you downgrade, you'd each be fine with the 50 GB plan.