the okitas were a samurai family but mitsuba and sougo really only had each other in those days. i'm assuming mitsuba probably homeschooled him with what education she had and kondou took up the rest at his dojo
i need to do more research into it since samurai would have had a special education but given the way mitsuba and sougo were living idk if they would have access to that at all
hmm looking at the Shoka Sonjuku trio's background vs Shinpachi's and Otae's you get the impression that samurai in Edo might go to temple school if they weren't from a very high class family (like Kyubei), but in the countryside they weren't expected to
but yeah that is interesting. gintama is anachronistic after all, but the extent of how anachronistic it gets during the past could just be a matter of preference when writing them with what canon gives us