I can recommend going a step further, if you can afford it. Get an all-in-one combo ventless heat pump washer/dryer. That's a lot of buzzwords, but it's not a compromise, it's pretty much the best of all worlds. I have one (made by GE) and it's basically perfect except that it spent the first few months of its life constantly nagging me to install "the App" and/or connect it to the Internet, which I absolutely did not do and it eventually gave up.
This is not a traditional ventless all-in-one, there's nothing traditional about it. It uses a heat pump (effectively using both sides of it in fact), it runs on a single 120V socket, and doesn't vent any moisture into the house nor does it suck any conditioned air out of the house during heating/cooling seasons. It washes first and then dries the entire load in one go. It doesn't vent because it dumps the condensed water down the drain instead using the cold side of the heat pump to condense the into liquid and the hot side to actually heat and dry the clothes. It's actually even more energy efficient than you imagine, because a lot of the heat is in fact generated by the latent heat of the water as it goes through phase change, with wet air cooling slower and dry air heating faster, it's some bizarre physics at work but liquid water at room temperature is actually a huge energy battery and the heat pump effectively uses some of the water's own energy to heat and dry the clothes. It can even do unique things like blow air first before the wash (called "pet hair mode") to get most of the hair and lint out so it doesn't go into the pump and the drain.
Besides being energy efficient and smart, this significantly reduces laundry effort too. No more switching from washer to dryer. It's start-and-forget. Other than cleaning the filter and occasional maintenance like vacuuming the lint out and refilling the detergent tank, it's a magic machine where dirty clothes go in and a few hours later clean clothes come out with an absolute minimum of energy used. If it could sort and fold them too it would be absolutely perfect, but alas, we're not there yet. It's still pretty damn good compared to a traditional laundry experience.