Where in the DB are CiviCase timelines and sequences stored?
Generally, civicrm_case_type.definition

If the definition is NULL, then it will fallback and search for an XML file.

The loading logic is in CRM_Case_XMLRepository.