The key, in addition to the bottle tax, is automated bottle collection machines in pretty much all grocery stores that'll issue receipts to be used to offset against purchases at the till. It's so convenient most people return them, and the bottle tax ensures most of those that gets thrown away gets picked up by kids or poorer people for the money.
Most undamaged glass bottles would be returned to bottlers by volume rather than origin, for washing and reuse, apart from Coke bottles for obvious reasons.
Though these days most of the bottles are still plastic, but are still largely recycled - even if the energy savings isn't all that huge, it still saves a lot of landfill space.
No such thing exists for glass bottles but they do get recycled. There are even separate recycle bins for white, brown and green glass. Yes, germans take trash separation seriously (on a related note, people in Japan too).
Everything that you buy per crate is usually returned as a a crate with empty bottles again. Case in point: beer bottles.
Depending on brewery and type of bottle, I used to get beer that had the name of another beer printed on the (non-removable) snap-lock cap[1]. The same goes for a variety of other glass bottles. They are simply washed out (usually chemically), refilled, a new printed label is put on, a cap put on, done.
They fixed that by making the deposit not payable by the food stamp.