There were no knowledge workers in the middle ages.
There definitely were what could be considered knowledge workers in the (high) middle ages, it just wasn't the majority of work like today. The knowledge workers then were just a tiny, elite faction, mostly employed by the church or directly by nobility. Kindgoms were still big bureaucracies and needed scribes, theologians, academics, lawyers.
Relatively few anyway. Monks (who wrote and edited books and managed libraries, and also taught), artists and musicians, bookkeepers/treasury/exchequer, scribes/chancery (who were the administrators of the kingdoms), and bankers all existed in European "middle ages". But a significantly smaller part of economy/society compared to "western world" now, yes.
There wasn’t 20x value to pay for in the middle ages either.
Are you sure? Any functional organization requires keepers to oil the machine. First the government. The best examples were the chinese empire, the catholic church, and the various kingdoms. Or do you think that everyone was either fighting or farming? Stewardship is knowledge work. Bookkeeping is another.
Back then people were mostly farmers, but we already automated that job away.
Not completely, but compared to the middle ages we 50x'd their output. Which is a great illustration what it means to make a job 50 times more productive. We went from 80-90% of the population being required to barely make enough food for everyone to survive, to 4% of the population producing such an abundance that consuming too much food has become a systemic health issue