Replenishing the deck after both draw and discard piles have been exhausted
Yes, that is what would happen but that is supposed to be a rare situation as it is not intended for the players to hold all the cards in their hands. The rules cover the situation for when there are no cards at all for players to draw and by extension it also covers the situation when a route is claimed and there are now cards to draw
https://ncdn0.daysofwonder.com/tickettoride/en/img/tt_rules_2015_en.pdf

When the deck is exhausted, the discards are reshuffled into a new draw pile deck. The
cards should be shuffled thoroughly, since all the cards have been discarded in sets.


In the unlikely event that there are no cards left in the deck and there are no discards
(because players are hoarding many cards in their hands), a player cannot draw Train
Car cards. Instead he may only claim a route or draw Destination Ticket cards.