How does the Shimano Power Modulator works? Since there are at least 3 power modulators from Shimano, I refer to the SM-PM40, a little cylinder that runs on the front brake cable. I never had the chance to open one ... I actually never tried one.
In my experience, they simply don't work.
Some newer bike riders are terrified of doing a hard-brake and then going Over The Bars in a disastrous and injury-inducing cartwheel.
While this is possible in reality, this is avoided by using good modulation on the brakes as you slow, and moving your body weight back as much as possible immediately.
The power modulators work by being weaker than the brakes. So if your (cable-based) brakes get pulled on really hard in a panic stop, the modulator passes the first part of the force through to the brakes. Then subsequent heavier cable tension deforms a dense block of foam rubber or a spring, either of which are firm enough for the brake to work okay, but not transmit enough force to let the brake lock up and make the wheel skid.
With age and wear, the modulator also changes its resistance, transmitting less and less force through to the brake as the internals wear out.
I remove and bin them when doing a bike overhaul, often while replacing brake inners/outers.
There appears to be a couple of things that Shimano calls 'Power Modulator'. I think the I think the basic idea of both is to prevent inexperienced riders from over-braking and losing control.
If you are talking about coaster brakes, it's basically a clutch which limits braking force. https://bike.shimano.com/en-EU/technologies/component/details/power-modulator.html
There is a mechanical disc brake version too which changes the lever ratio as the brakes are applied. https://bike.shimano.com/en-EU/technologies/component/details/power-modulator-unit.html