You can buy UL-certified commercial products that intelligently split a 240V outlet to two different loads.[0] They're popular in the EV community for avoiding the cost of a dedicated circuit for charging.
[0] https://getneocharge.com/products/neocharge-smart-splitter