it could be dangerous to the shrimp.
What shrimp? Nobody has mentioned anything about shrimp.
Either way, doing a 50% WC with 100% Distilled replacement will be fine.
If You have any real concern: just add back a gal wait 10 minutes add the next gal, etc.
Swapping out 1 or 2 gals. at a time is going to take a lot of water changes and a lot of testing to reach your goal, and there's no point or purpose in doing it that way. Plus you are paying for the distilled. You can do this for $3-4 or $20-30--Your Choice.
With the numbers you provided--a 50% WC is going to put you right where you want to be. Doing it the other way suggested is going to have you running around in circles buying distilled water and doing tests--and the math is going to get harder and harder. Keep it simple: Take out 5 gals. put in 5 gals of distilled, then 50/50 distilled/tap.