How to connect Dryer outlet to a power distribution unit?
The cost of a properly protected temporary power distribution unit would significantly exceed that of installing a proper circuit.
Can it be done by code? Yes it can. (I have not looked into 2020 code as it is not yet adopted but believe the same requirements apply + the 240gfci).
I have built one for a young man that wanted the same thing in a rental house.
The 120v laundry circuit is dedicated.
I did not think this would be code compliant so I checked with one of my inspectors.
He reminded me that my portable power outlets used for building houses are basically the same thing.
They have breakers on the unit and each receptacle is GFCI protected. Everything connected to it is cord connected and not built in. So I built one based on 30 amps he was able to run 4 of his servers / OR the dryer. I believe we were on the 2014 code today that would require a GFCI on the dryer also even if the dryer is an older install without GFCI because this as a temporary install it could only be used for 90 days.  He stressed the 90 days and said who doesn't rearrange things every quarter anyway.
As a temporary installation for equipment that is cord connected it could be done but the cost was well over 3x that of an installed set of branch circuits.
I used a Hoffman box to house the 50a DPDT switch I used for the transfer and 5 receptacles inside the box was a small breaker panel fed on 1 side of the switch to the GFCI protected receptacles, the other side went to the dryer receptacle.
The only change I know of would be the requirement for the 240v receptacle to have GFCI protection but as a temporary setup I don’t see why it could not be done.  Note temporary is defined as 90 days and that would be the only way it would be legal.