The way the Boost/Powered Up connectors are designed, it's not possible to have multiple motors on the same output of a hub like it was possible with 9V or Power functions. However, since I only want to stack the straightforward M-motors, the electronics should be simple enough for a DIY solution. Does anyone have a tutorial or pointers?
All you should have to do is connect pins 1 and 2 between the two motors. One motor will have all six wires connected and serve as the primary in order to give the hub something that it can properly identify. The second motor can simply piggyback off of the primary and share control voltages that are meant for the primary motor. Essentially, you can leave one set of identification circuitry in place, and then wire just the motors in parallel.
I'm not sure if Powered Up compatible connectors are available anywhere, but it's not too hard to open up the motors and connect to them that way. Here's what it looked like testing this out:
I paired pins 1 and 2 here and things worked as expected.
There really isn't any easy way to do this at the moment. I would suggest buying plugs and making a simple port splitter, but I don't think there's currently any place to purchase the parts.
The best you can do involves (permanently) splicing the wires of the two motors together, using a single plug for both of them. With only the M motors this shouldn't cause electrical problems but having two motors permanently attached to a single plug is obviously less than ideal.