My own installation uses a combo Pumphouse & Powerhouse as it has the Well Head on one side and all the solar gear on the other. Due to my location (Northern Canada), it is hyper-insulated with Thermally Broken walls (walls are solid XPS foam between the studs, then 1" XPS between the studs & sheathing which thermally separates the structure). Dimensions are 14'x7' so it is within the exemptions for my region.
The solar controllers & inverter/charger, batteries etc are all within the building. VAC is run via an underground conduit to the house. As I am completely offgrid I did not have to suffer the exploitation of Big Power and their rules and nasty expenses. Everything is inspected and good which was required by home insurance. They actually like the idea of a separate powerhouse that keeps all that gear out of the Habitable Structure. The mentality IS changing but it is a very slow moving change as many insurance companies are not only fearful of solar & battery systems a few are essentially paranoid to the extreme.
To that end, please CHECK with your Insurance Co and see what they require for coverage. Far too many forget this step and then the Insurance Co comes along and let's just say the air gets pretty blue quickly. Some companies are extremely picky while others not so much. When I say "Picky" they may insist on material grades, certified products, assorted inspections and lord knows what else. This is even worse IF you are connecting to the Grid to Export Power. If you are grid-connected and are only going to use Grid Power to charge batteries when low or for Timeshifting the rules are more relaxed.