Stacked washers and dryers can be installed within a closet. The manufacturers include installation clearance requirements within their installation manuals. I just completed the design of a laundry closet that will house stackable Whirlpool units. The interior dimensions of the closet are 37" by 37".
could stack and hide behind nice doors/wood cupboards and then to side have closet space for cleaning supplies, brooms, etc. and area that could be opened for drying rack or rod