See, that is the thing. You can ALWAYS provide what the dog needs, even in an apartment.
Have a high energy dog? Take him to flyball or agility classes to exercise mind and body.
Too hot? Provide a cooling bed. We have a very heavy coated breed (komondor). Our breeder lives in Houston, talk about hot and humid.
Living without a yard is never an excuse. There are plenty of options out there to exercise both the mind and body for dogs.
There are legitimate reasons to rehome a dog. For instance, neglect and/or abuse. The dog that was crated for 18 hours a day - that is neglect and abusive. But I don't think the OP is abusive like that. She wouldn't crate her dogs 18 hours a day.
Another legitimate reason to rehome is if you are having medical issues and creates issues taking care of the dog. I have a 2 year old right now that came from some very experienced dog people. But she just had surgery and is unsteady on her feet. The doctor said it would be about 2 years for a full recovery. Our new dog is very, very rambunctious. After almost falling down the stairs a couple of times, they needed to rehome the dog. This was a medical issue that was causing a dangerous situation.
And the dog has settled in very well. Dogs can be rehomed sucessfully. But, this dog is from our breeder and if we didn't take her, the contract says she has to be returned to the breeder. So, we know she will never end up in a shelter. She is here for life, so barring anything major medically, we will never have to give her back to our mutual breeder. The former owners would never have just rehomed her to friends or anybody like that because there would not be any guarantee that they would follow the contract and return her to the breeder. They wouldn't take any chances that she would end up in a shelter in a few years.
However...rehoming a dog due to poor planning and sheer convenience should never be an option. If you are planning a move, part of your plan is how to include your pets.
We had good friends that was transferred to the UK for 3 years. Even though they had to go through a quarantine, they moved their Golden with them. They just visited her in quarantine every day. Was it inconvenient - you bet. But that is responsible pet ownership.
The first and foremost responsibility is to make sure your pet never ends up in a shelter to be euthanized.