To measure the power consumption of each motor, you'd need to measure the voltage and current, before the motor driver.
(the 3 phase power after the driver will be very hard to measure).
Both voltage and current measurements will need to be filtered to remove the 40 kHz signal, which will otherwise cause all sorts of trouble, as you correctly anticipate.
Fortunately, 40 kHz is far away from your likely sample rate of about 50 Hz. A first order RC filter with its knee at 40 Hz will attenuate the 50 kHz ripple voltage by about 30 times, which might be enough. An inductor and two capacitors will be much better.
Voltage is fairly easy to measure - as a nice low impedance source, you can build a simple filter and feed it to your ADC. You only need one voltage measurement after the 24 V power supply. The ripple in the voltage should be fairly small anyway.
Current is a bit more tricky. You could use a sense resistor in the ground wire, and an op-amp to amplify the small voltage, then the filter. At some torque settings, the current might really be a square wave at 40 kHz, it'll be hard to measure and filter. It might be an idea to filter the power line itself with one LC, just to remove some of the ripple, and then filter the sense output again before the ADC.
One last digital idea would be to sample faster than you need to, perhaps at 1 kHz, and average these in the Arduino. The aliasing will still be a problem, however if you randomise the time of the samples, you may be able to average out the 40 kHz signal, preventing it from being properly aliased into your band of interest. Some experiments here would be valuable.
It would be easy enough to make an "extension" cable for the 24-pin ATX power cable. Into this special test cable, you could wire "high-side current sensors" that would measure the current for each supply voltage. With this test/monitor cable you could easily connect it to any power supply and any motherboard.
These are inexpensive enough that you could properly meter each voltage. And they are easy enough to interface to with laboratory instrumentation, or even a hobby microcontroller like Arduino, et.al.
Here are two examples of high-side current sensors. Already assembled on "break-out boards" and ready to wire into your test circuit. They are both < US$10 and there are several other examples of similar products.
https://www.pololu.com/product/1186
https://www.sparkfun.com/products/12040
Best Answer
A computer or other appliance power supply is not a resistive load, it is a reactive load. It has a phase relationship to the incoming voltage, which is itself an alternating (AC) voltage. AC voltages inherently show an "average" of essentially zero. What is measured for power computation is an "effective" or "Root Mean Square" (RMS) voltage across, and current through, the appliance power feed.
Therefore measuring the resistance across its power supply leads will not provide meaningful results.
At a simplistic level, Voltage measurement could be done with a RMS voltmeter across the supply leads. See this EE.SE answer for more details.
Current measurement would need an RMS current meter either inserted into the power line in series, or using a clamp-type non-invasive current sensor.
Low cost AC power line meters use a basic rectifier circuit and internal computation to indicate power consumption. These are designed for specific power line types (e.g. 110V 60 Hz, or 230V 50 Hz), and will deviate from precision if used on a different line frequency, if they work at all.
The above does not take into account Power Factor calculations, another element impacting actual power consumption calculations.
The proposed multimeter approach will yield nothing except possibly a damaged multimeter and the risk of electrocution if you are not qualified to work with mains voltages.
There are commercially available power meter devices that plug into your wall socket, with the appliance plugged into the device, and log or display power consumption. That would be the recommended way to go.