Not quite. The term "Doctor" originally meant "teacher" and was applied to many fields, among them medicine.
Your A.I. generated source is only partially correct.
The term "doctor" does in fact come from the Latin "docere" (we use a couple of words with the same root in modern Italian, for example "docente" = "he/she who teaches" and "dotto" = "erudite/scholarly").
However, the popular conflation doctor<>physician started only in the 14th century and was popularised in the novellas of a Florentine novelist called Franco Sacchetti ("Trecento novelle").
The reason why the mapping "physician=doctor" then took hold and solidified is that physicians were often the only "erudite/scholarly" people common people ever came in contact with.