Your son only has a right to a refund if such a right is written into German law. Otherwise the supplier can lawfully keep his money and say "The problem's at your end and nothing to do with us. We've sent what you ordered, so you'll have to pay the fees if you want to receive it". Even if there is a right to a refund under German law, the supplier might still refuse to issue it, knowing that your son would need to take (very expensive) action in the German courts in order to challenge any such decision.
If the supplier is prepared to offer a refund though, the 'import duty' (which I suspect is actually mainly Import VAT) won't be payable to HMRC and therefore shouldn't be deducted from the refund. However UPS will almost certainly charge the supplier their regular customs examination fee (£12, I think), plus their special UK Border Fee (£4.50) plus the costs of the return carriage from the UK to Germany. It's therefore likely that such fees would be deducted from any refund which might be offered.
Most items purchased from the EU now cost 20% more than before because of the Import VAT that's charged on them. Then there are customs examination fees and shippers' own UK border fees to add on to that:
https://www.bbc.co.uk/news/business-55752541