All luggage storage is in the same coach (vehicle) as you are travelling in, there is no separate luggage coach.
3 bags for one person would be very difficult to handle, as you have to carry them from the street, through the station, onto the train and store them in the train yourself, there is nobody to help.
All coaches have overhead racks, and spaces between seat backs. Some coaches also have floor to ceiling racks at one end (click for photo), which may or may not be visible depending on where your seat is. Locking your bags to the rack can annoy other passengers if they want to get off at a station before yours and can't get their bags out.
It is the same for 1st and 2nd class, just in 1st class there are slightly fewer people in each coach.
Are you sure your coach has compartments? Most are open plan. There is info and photos about Prague to Salzburg trains here: https://www.seat61.com/trains-and-routes/salzburg-to-prague-by-train.htm
The trains in the photos show compartments between Prague and Linz, but open plan (2+1 seating) between Linz and Salzburg.