Let's say on a payment I charge a 5% fee to cover the fluctuation of the market. Is it possible to send back the overcharge or part of it if at the time of the execution of the transaction the actual exchange rate ETH/USD was lower and part of that fee or all of it wasn't necessary?
Yes, it should be possible ( but i never tried it ).
There is a service called
Oraclize that let's your smart contract access data outside the blockchain, which you can use to get the exchange rate (ETH/USD) and do some math on your smart contract to calculate the refund amount and successfully send it out.
You can learn how to use oraclize on your own or try this tutorial: https://hackernoon.com/external-price-feeds-in-ethlend-using-oraclize-20e0b41d0b73