Hello auransbey,
that's a thing with the power supply.
Basically, a USB interface can only max. 500mA, even when connected directly to a PC. These 500mA are defined as standard for an USB interface.
In the case of the USB HUBs, a distinction is made between those who have no external power supply as their HUB, that is to say they are supplied via a PC USB interface. Then with a HUB with 4, 5 or 7 USB connections only a total of 500mA can be taken.
For USB HUBs with external power supply usually an external power supply is supplied, which provides 3.5A (even with a 10 HU

, because it is assumed that not permanently on each interface 500mA be removed.
As far as the electricity consumers are concerned, you are absolutely right: Inputs do not consume electricity, at least not worth mentioning.
The LEDs will look different again. If you connect 40 LEDs with 20mA each to a MEGA, then the MEGA is busy, because this may consume a maximum of 800mA current. However, since a USB interface delivers a maximum of 500mA, this has the consequence that the additional required but missing 300mA can not be delivered because this does not allow the specification of the interface. So if the power is needed but can not be supplied, the operating voltage will drop. As a result, the MEGA can not work as it should.
A remedy here, provided that the power consumption is caused by LEDs, a higher series resistance for LED, so that e.g. instead of 20mA only 10mA flow. 40 LEDs x 10mA = 400mA. So a halving of electricity consumption. This applies in the case that all LEDs can / should be switched on at the same time. Therefore, when designing the consumer, care should be taken to distribute the electricity consumers so that no overload occurs.
To the stepper motors: These require already as quiescent current 170 - 200mA, in operation correspondingly more
If now 2 stepper are connected to a MEGA, then it should probably collapse in operation, if still a corresponding number of LEDs is operated.
The 7-segment displays are operated in multiplex mode by the MAX7219, whereby only one 7-segment digit is lit per MAX chip. However, since this happens with a frequency of 1000Hz (1000 times on and off per second), this does not notice our eye.
Recommendation: Consumers, such as stepper motors or servo motors, use their own external power supply. The control lines for the motor remain at the MEGA, the GND of the power supply of the stepper also. + 5V come then from the external power supply as power supply for the stepper. Please make sure that the GND of the external power supply is connected to the GND of the MEGA. If a ring lead is used for GND, connect the GND of the external power supply to this GND loop.
You should be careful to distribute many power consumers (like LEDs) to multiple MEGAs and connect large power consumers (like steppers) to external power supply (s). The output voltage of the external power supplies must not be higher than the operating voltage of the MEGAs, ie 5V.
I'm sure if you build your circuits that way, no MEGA crashes and your test runs will be satisfactory.