Well maybe archery as Arabia has the most units: Archer, Longbow, Crossbow, Horse Archer, Camel Archer.
Though Horseback Riding with anyone is tied for that: Horse Archer, Knight, Crussarier, Cavalry, War Elephant... so let's see if anything gives six.
Ah!
Rifling gives Rifleman, Cavalry, Infantry, Marine, Tank, Mechanized Infantry... maybe even more like Modern Armor(?) but regardless that gets my vote for most units.
If by "include all civs" though you mean pretending we're some sort of super-civ that gets all unique units, then horseback riding instead, so many horse UUs. But if nothing weird is hidden in that question then just Rifling.
As for buildings, let's see...
Meditation, Priesthood, and Music. All have eight buildings.
Seven types of monastaries, Shwedagon Paya
Seven types of temples, the Oracle
Seven types of cathedrals, the Sistine Chapel
Ignoring religious buildings then I think masonry is right: Walls, Aqueduct, Pyramids, Great Wall, Great Lighthouse