So there is actually a difference in Medieval and Renaissance times, between a Jester and a Fool.
Jesters were typically known for their witticisms and wordplay - essentially their ability to work clever jests.
Fools were typically physically and/or mentally impaired people who provided entertainment because of unintentional behaviour or speech.
There was a great desire for dwarves as well, and while such fools and dwarves were seen as 'pets' or treated in a manner we would find generally unacceptable today, the understanding of the time meant that people believed that those who were mentally or physically disadvantaged were actually possessed or cursed by demons or fairies (who were also the cause of autism by this periods understanding - changeling child or fey child being those who interacted with the world in a different manner than was usual).
However, such individuals were generally well treated and looked after, partly because of the fear of The Fair Folk's retribution for ill treatment, or the fear that without a proper outlet, the demons or power of mischief might cause terrible harm.
Being taken in as a fool was a great deal better than having someone of religious persuasion attempt to excorsize or beat out the devils.
That is not to say that they were not subject to verbal abuse and mockery, as that was unfortunately part of the role imposed upon them. Joao de Sa, known as Panasco, who served King Joao III of Portugal, did very well in the court and was elevated to Gentleman status, but was seen as inferior and was constantly verbally abused and treated as sub-human due to the physical impairment of being a Black African. This was the ugly truth of racist belief in the 16th century, that not being white was seen as a physical disability.
Whilst some Jesters & dwarves in particular took advantage of education and opportunities available when serving at Royal Courts or wealthy households, like Richard Gibson, the miniscule portrait 'minaturist' of the Stuart Court, or Francois de Cuvillies, decorative designer and architect attributed to being pivotal to the arrival of the Rococo style to Cenytral Europe, they often had to endure being seen as possessions and treated as such for entertainment, like Jeffrey Hudson given as a gift to Queen Henrietta Maria by King Charles I, her husband, when he presented her with a pie, in which Jefferey was served.
Those who were classed as 'Fools' often had carers, like Nichola La Jardiniere - Fool to Mary Stewart/Stuart, Queen of Scots - who had Jacquiline Cristoflat as a 'keeper', to look after them and would generally be given a pension when they became too old to continue in service. Whilst far from what we in modern times would ever think acceptable, at the time, it generally meant they had a place of protection, with regular meals and often luxuries not available to the larger population (for example, Nichola La Jardinier had a gown made of yellow and violet by the Royal Tailor, velvet caps and bonnets, and was served sugared fancies and such).
As you mentioned, Jesters & Fools were not only found in Royal Courts, but in wealthy households and Jesters at least, on stage and as part of travelling players troups.
Robert Armin (c.1563-1615), who followed after William Kempe (who performed comical roles in Shakespears plays) as a Jester on Stage, actually wrote a book about the subject in 1605, called "Foole Upon Foole", where he describes the various different talents and jests associated with the position, and distinguishes the difference between the 'natural fool' and the 'artificial fool'. In an expanded version called "Nest of Ninnies" published in 1608, he also included histories of some celebrated Jesters and some of their recorded jokes, such as those by William Sommers, Jester to Henry VIII & Edward VI.
~edited to add~
It's difficult to be certain of the meaning behind the usage of words such as "fool" and "jester" or other terms, as unless you are looking at original sources, the two terms were often used indiscriminately by some writers in different eras, and translation issues can also make it difficult to be certain, let alone regional differences of meaning (this is always problematic when dealing with original sources, which is why Mary Queen Of Scots inventories are so useful, as her master of the household actually added notes telling us how some items previously appearing in inventories of the Queen's Mother, Marie de Guise/Lorraine, were referred to in his time).