I'd think processing costs would go down with general costs of computing and network capacity going down. Where are all these fees going? Credit card rewards, or are the processing companies an ultra-profitable cartel or something?
Both the credit cards themselves and the processing companies have made quite a bit, though obviously Visa/MC/Amex make the bulk of the money. Processing companies typically use standard Visa/MC/Amex interchange rates plus their own margin, which has been going up quite consistently. For retail credit for base Visa interchange fee (as an example), on Visa Infinite or Signature Preferred cards, that would be 2.3% + $0.10 and 2.1% + $0.10 respectively.
You might see processing companies add in something like an additional 0.4% + $0.10 per transaction or more. Numbers will obviously vary and some may charge a higher percentage or a higher base cost per swipe. They will also potentially require equipment purchase and will also add in additional fees that are charged yearly, like a PCI compliance fee or a base membership annual fee. You might also see the typical junk fees that are hidden like monthly statement fees and what not along with the usual cancellation fees.
As a whole, most processing companies are pretty scummy and will nickel and dime while charging as many hidden fees as possible, some even doing incredibly shady things like charging higher rates than the published Visa/MC/Amex interchange rates (and calling it interchange rates) and then adding their own margin on top.
I will say with regards to the topic though that any small business having a surcharge higher than 4% is likely pocketing the difference, considering that the published rates plus margin for the processing company shouldn't be higher than 4% and not all transactions will be credit or at the highest level of rewards cards plus debit card transactions are charged at a much lower rate (0.05% + $0.21).