This is largely theoretical knowledge at this point since I’m in the process of obtaining second, third, and fourth passports as of writing.
The US doesn’t have true exit control. You might get stopped by CBP randomly in the airport, but I have never seen nor heard of that actually happening. The US SecureFlight database links passports to people and relies on airline manifest reporting. You can use one to check in for the flight, a second to go through TSA security, and the first to board, if desired, and it would be sorted out behind the scenes.
Coming in, you’d use the appropriate passport to check in for the flight and to present to CBP. Presumably that would be your US passport (if a US citizen) or your Canadian, VWP, or passport associated with your visa or green card.
In countries with true exit control (like Italy, in this example), you are supposed to use the passport for entry to the destination at airline check in and boarding, but use the passport you entered Italy on at exit control. Having gone through Italian airports (and others, like Turkey or other EU nations), these are discrete stages and you could, in theory, swap passports between them.
I would (here is where it becomes theoretical, at least until later this year) from the US book the flight with my Italian passport and check in for the flight with my Italian passport. I would present my US passport at the TSA security point. I would present my Italian passport at the gate for boarding (if needed). There are a couple of things here. One, in the US, your boarding pass is marked “Docs OK” after check in and so I believe any passport would work at the gate. It’s an ID check against the name on the boarding pass. My wife does not get asked for anything with her less than desirable passport at that point. Two, I’ve been on some flights to Europe where they just take pictures of your face and no passport is presented at boarding.
At any rate, I would present my Italian passport at Italian entry control. I would book a flight to the third destination (Russia, in this example) using my Serbian passport and use that for check in. I’d switch to my Italian passport for exit control and then back to my Serbian passport for boarding and entry into Russia.
There are some complicating factors. One was mentioned above, in the case of China, where you are not supposed to have that second passport. The best case there seems to be to plan a stopover in a third country and switch passports there. Communication between immigration across countries is inconsistent from my (incomplete) knowledge. The other is that I don’t know how well other countries without formal exit control handle multiple passports. I don’t remember going through exit control for Ireland or Japan but haven’t the slightest clue how their systems work.
I’ll be experimenting with this later this year to see how well the theory lines up with practice.