YouTube has different needs for different videos. The average barely-viewed video can use quick and dirty hardware compression, but a large fraction of views are on a small fraction of videos, which is the sort of thing that more intense AI-assisted optimization would help with.
In that case, they could probably just trigger a re-encoding of videos when they cross into 100+ views from over 50 unique IP addresses or something like that.