Netflix’s partner help center page contains some great resources for producing accessible content. Along with their captioning style guide, they also provide a style guide for adding audio descriptions to video content. Although the guide is meant for Netflix content, the information provided is more generally about videos and is applicable to anyone producing captions and audio descriptions.
Netflix has a comprehensive and well-written style guide for timed text/subtitles, which goes into great detail about handling the many situations in subtitles. As well as the English guide, there are also several other guides written in English that explain how to style timed text in 37 different languages, from Arabic to Vietnamese.