Which company should I sue for compensation?
Suing seems a little excessive. Lost baggage is a fairly normal event and is governed by the terms and conditions of the marketing carrier that you agreed to when you bought the ticket. In this case that's Emirates and their rules (including compensation) for US passengers can be found here. Most policies are guided by the Montreal Convention
You will need to file a lost baggage claim at arrival airport of the last leg of your itinerary (even if your bag was lost or destroyed 3 airports earlier). Typically the desk is staffed by the airline that operated this leg or by a 3rd party baggage handler.
You track your claim and negotiate your compensation with Emirates.
In case I would like to avoid such mistakes in my following flights, I could potentially go to the company's desk at the connection airport (assuming the layover is sufficiently long), and verify that the baggage was transferred. Which desk should I go to?
You can't avoid this. Bags are occasionally lost and there is nothing you can do about it. You can walk up to the check-in desk, service desk, or the gate agent, but its highly unlikely they will give you an answer. Even if they were willing, they often don't have access to the information. Some airlines have automated baggage notification systems, so you get a text every time your bag moves.
If you actually get lucky and have indeed confirmed that your bags have been left behind, then what? Your only choices are to get on the flight or not. If you don't board, you have missed your flight and the rest of your itinerary will be canceled. The only viable option is to get on the plane, file the missing luggage claim at your final destination and take it from there.
I understand that this is frustrating but it's a fact of life in airline travel. I have seen a suitcase of ours being flopped wide open and the distributed contents riding up the luggage belt, I have seen one of my bags left behind right under my window (with the flight attendant giving me a hearty "not my problem" attitude), I had a truck running over a guitar case (obliterating the case but miraculously not the guitar), I saw a bag of mine being broken right at the drop off, etc. These things happen: the only thing you can do is to file a claim at the final arrival airport and go with the flow.
I never check anything mission critical and I rarely check at all. Even if I do, most of the time the bags show up on time and in good shape. Problems happen, but they are rare events.