Has there been any explanation as to how the unhackable ~th code that runs at the end of both universes came about? Because that seems like a pretty critical component to Lord English's existence that actually hasn't been explained yet (Lil Cal/souls are only directly connected to doc scratch, in terms of things being combined to make more things).
No, but knowing what we know now we can assume Lil Hal (or some version of lil cal/le) wrote it.