Yes, it can be a substrate replacement if the tank was healthy. But if I suspect any disease in the tank, it will be a whole new tank, new substrate, new filter and media. I have the benefit of having multiple shrimp & fish tanks, all on separate canister filters/air filters, so I can seed a new tank with good beneficial bacteria almost instantly by squeezing the gunk into it. But I won't take it from a tank that has bugs or disease in it, of course.
I also have spare tanks that I can use to build and cycle separately. Hopefully you have a spare too. It always comes in handy for a hospital tank or when resetting tanks. If not, a bucket can always substitute as a temporary tank, while you breakdown and setup the old tank.
After the new tank is built, I'd be careful not transfer anything over, except the shrimp, not even plants. Disinfect the nets and let it dry in the sun before using it again. Again having multiple nets is an advantage.