From my personal research and discussions I've had about power management... look at the engines ostensibly assigned to a terminal historically and how big the terminal was and then... do what you want using that as a guide.
To answer your question, so... sort of yes and no, and very vaguely: it depends... I'd suggest/guess, from you 8-9 loco/unit remark, a minimum of 5 covered areas, preferably 7-9 plus what might be needed for other power.
Rule of thumb is 3 steam engines per needed engine, as the other two will be under some form of maintenance, based on the needs the timetable calls for and 1 spare engine for extra work (i.e. I need to run the 8 timetable trains, 4 each direction and only 2 overlap at any one time, so I would require 3 engines, or 7-9 steam engines/3-4 diesels, or combination thereof). That being said, it depends if you have a larger terminal you can send you greater repairs to, or if you are completely on your own. For an independent "short line" with only one engine terminal then 2-3 places per need loco is about right, that doesn't mean all in the roundhouse, some of that can be in a shop or outside on the "garden" track for major repairs (or waiting on said repairs). Should the locos fit in the assigned covered space, that is a environmental question, but ideally, yes; as most workers like to be comfortable when working and in northern climes anything that has water in it needs to be warm in the cold... so in the north, in steam, under cover or drained in the winter; in the more southerly climes a dry workspace is more likely the bigger concern. If it is only occasionally that something doesn't fit then a temporary door is the best solution (and may be as simple as a tarp around the end). Long-term you should have 20 feet/6m more than the length of the unit, as your workers need to get around the unit while staying in the building and your hostlers like some wiggle room when spotting up. Remember steam is super maintenance intensive and you will need a shop switcher or two to move dead locos, your turntable is the crucial bottleneck, you will keep a hostler (or several) busy even in a small terminal, and you need line of sight to signal or relay signals to the engineer/hostler.
Add the economics and management decisions of the road into all of this and you can pretty much do what you want. Management doesn't always make good decisions and bigger power is usually prioritized before the plant to maintain it. The "mallet" sheds were a way to reduce turntable use and cutdown time on units were sitting by being able to run them through the shed and have them continue ion the way, remembering that 100 miles is about the service interval of a steam locomotive. Also you don't necessarily need shop bays for specific locomotives but rather for types of repairs... as the tools can be specialized and it makes it easier to move what rolls (the engine and tender) rather than lifting a multitude of heavy toolboxes/tools and moving them all over the shop. Don't forget you are not just maintaining the engine but the tender as well, and sometimes the get taken apart and so on.
Ideally you want enough cover to put most of those big guys under it, and don't forget the smaller units can also use the larger spaces... it's super vague and flexible. The more engines you have the more flexible it all becomes and the less cover you need.