What do airlines do with planes at the end of a multi-stop route?
Deadheading is rarely done because it is a non-revenue movement.

The most common use of deadheading (that is, flying the aircraft empty) is done for maintenance runs.

At the end of a scheduled route, the plane is parked at the last destination.  Sometimes, the next flight around uses the plane (if the route can be serviced by the aircraft).

Typically, airlines try to "park" their planes at their hub locations (where they have favorable landing and parking fees) rather than leave the aircraft at another airport.

Flight operations and planning make sure the aircrafts are maximized on revenue movements.

To give you an example - the shortest scheduled commercial flight for the A380 is Dubai - Kuwait (EK857); and the return flight Kuwait - Dubai (EK858).

The inbound aircraft on the flight yesterday (A6-EOH) was inbound from Perth to Dubai; and then flew to Kuwait and then back to Dubai. The next day (July 1st), the same aircraft is scheduled for SFO. (See the flight log at flightradar24).