It turns out to be very easy.
Create in/out ports for the second sound card with alsa_in / alsa_out
Then open an empty instance of JackRack and set the number of channels to the number of recording inputs.
Open Audacity and connect it to JackRack and set the number of recording channels to the number of JackRack channels.
Then connect the recording inputs of each sound card to the JackRack inputs.
For a bit more control you could use a suitable mixer (that needs to have sufficent inputs and outputs) such as “jackmaster” instead of the empty jack rack. or you could add amplifiers into JackRack so that the level of each recording channel can be controlled in software. You can even use real-time effect while recording.