The 5% per era bonus refers to research(tech cost reduction) only, and is the Deity value. On Immortal it's 4%, for instance. But yeah. the Ai actually just goes faster as the game goes on and they collect tech. They also get cost reductions for each player that knows a tech they are working on, and any time an AI + AI pairing meets the attitude and "# of players know this tech" thresholds for tech trading, they can
(doesn't mean they will) randomly gift techs to each other for nothing. This is especially blatant with Master/Vassal pairings, where even the attitude threshold for the Master is ignored entirely (Masters can always gift tech, for free, to their vassal). The Ais are always conspiring to collect tech ever more quickly and they do it without you being able to see it happen in real time, only as a result after clicking next turn. Just one of the many, many ways the AIs don't play fair with the human. But that's alright, the human isn't ever bound to play fair with the AIs either
Hammer handicaps are likewise adjusted by difficulty, but also don't seem to be universal across all units and buildings either. For instance, settlers are still pretty expensive for the AI even on Deity (91 or 92 hammers IIRC) yet they can produce an archer for 15 hammers, a 40% hammer cost handicap which is common for many builds. Of course this was probably done for balance reasons.