Wall units have been used this way many times. Make the framing to support the top and bottom sturdy and leave a 1/4-inch clearance top and side to enable removing the unit for service. Removable molding finishes off the inside. Caulking seals the outside.