This is really the same issue as most people have in their main panel - you can oversubscribe because, at least in typical residential applications, most circuits are not used to capacity and most circuits are not used at the same time. For example:
- 120V 15A or 20A lighting circuits in the past might use a few Amps - e.g., 10 x 60W incandescent = 600W = 5A @ 120V. Now with LED lighting you can easily light a big room with < 1 Amp.
- Heating and air conditioning are rarely used at the same time, so if you have electric resistance heat and an air conditioner, they won't run simultaneously.
- Power tools are typically run for short periods of time.
- Dishwashers and many other appliances only need their full power, which is often in the range of 10A - 15A on a 20A circuit, for only part of their cycle (e.g., for a dishwasher, only during the water heating or drying parts of the cycle - during the actual washing they use relatively little power).
There are some exceptions - e.g., clothes dryers, water heaters, ovens, cooktops, etc. are expected to run for long periods of time - but then they are limited to 80% of the capacity of the circuit (except for short-term startup).
The end result is that 40A @ 240V is actually a lot of power unless you are running a clothes dryer, tank water heater (don't even think about tankless...), electric vehicle charging or similar appliance.
Since 40A @ 240V is really 80A @ 120V (provided the loads are balanced), you can easily do something like:
- 20A or 30A @ 240V as needed for tools, with the proviso that you manage things reasonably well. If it is a one-man shop this should not be an issue as you can only do so many things at once.
- 15A or 20A circuits for 120V - easily 4, potentially 6 or more. The key is that some circuits (like lighting as noted above) really only use a tiny fraction of the circuit capacity, so for overall usage calculation, think of that 15A or 20A lighting circuit as a 2A circuit (but wire it as if it could someday have 15A or 20A). For power tools you can expect that a 20A circuit will draw 10A - 15A continuously, but as long as you aren't running the table saw, dust collector and 240V welder at the same time, that is not a problem.
There are other advantages to multiple circuits. If your lighting and receptacles are on the same circuit (like 1/2 my 1950s house...) then either a problem (GFCI breaker trips due to a problem with an appliance) or a deliberate action (turn off circuit to replace a receptacle) means the lights are out too. Similarly, if your refrigerator receptacle is on the same circuit as other receptacles then it goes out when something else goes wrong.
There are real calculations available for provisioning power to a full house. My understanding (but I am not an expert) is that a shed/workshop/etc. is a bit more lenient - more rules kick in when you start including kitchen, bathroom, etc.