so basically I figured this out myself after a lot of digging on the internet. This is the best answer I found, in another forum, at http://www.pclinuxos.com/forum/index.php/topic,119695.msg905379.html#msg905379
Basically, you will need first to add a fake channel, a "null sink", where the inputs will be collected. We will call it "inputs" and we will create it using this command:
pactl load-module module-null-sink sink_name=inputs
After that, you will need to create as many virtual channels you need for the devices you need to connect, linking that to the "inputs" channel you created before. So please repeat this command for any input you want to mix (and add one if you want to mix also the input of your laptop):
pactl load-module module-loopback sink=inputs latency_msec=1
(If you find the audio stutters, try increasing the latency)
Now you will have to connect this new "loopback" channels to the device you intend to record from. You can do this using "pavucontrol" (install it if missing), open the "Recording" tab, select "Virtual Streams" from the bottom selector and then make sure you connect a different input to each different loopback.
At this point it's just a matter of using your input in your application for recording, and you're all set! Please remember to setup also the output as described in my original question :)
I am happy to receive any better answer too, as this procedure (even if it can be automated) it's still too much error prone and does not automatically includes new devices added later (you will have to setup a new channel and add them again).