If the carpet has been poorly fitted and you are unable to secure it properly with either tacks, ring nails (my preferred weapon!), concrete nails or staples, then don't clean it!
If you shrink it, it's your fault and your job to rectify it. Simple!
If necessary call out a carpet fitter before you clean it and get them to secure it down for you, then charge the customer for it.
It's a heck of a lot easier doing it that way than trying to get a fitter in to stretch a carpet that you've shrunk, which is sometimes impossible.
Plus your reputation remains intact and the customer has a clean and properly fitted carpet.
I have called on the services of a fitter only twice, once to stretch a carpet that I shrunk(cost me £75) and once to secure a carpet before I cleaned it (cost the customer £20)