In congestive heart failure, the heart is just sort of wearing out, and it is all it can do to pump enough blood for a couch potato. To make it work any harder than it has to is only going to make it wear out faster. Dogs with hip dysplasia and other types of joint disease like arthritis may be harmed further by exercise. The repeated pounding and grinding on the diseased joints may just make the damaged parts wear out faster. Judicious exercise may help some, but it should be done only under the advice of your veterinarian who has examined your dog.
Exercise can be dangerous for a dog on a hot day.
Excessive panting and weakness or incoordination in the rear end are warning signs. I know many atheletic dogs don't seem to really need exercise the way a human athelete does. Some hunting dogs can spend weeks, or months, just laying around in a pen or kennel and then go out and run in a fast trot or lope until their feet get sore. They have a truly amazing cardiovascular system that can sustain aerobic exercise practically indefinitely. Exercise by itself is not a very good way to lose weight.