After Effects automation and annotation tools (scripts) for student work
As I've written on my blog, you can use the function evalFile to load the contents of an external file as data or executable code.

So if you have a file called titles.txt that looks like this

var titles={
    {startTime:1.23, endTime:2.23, textContent:"this is the first subtitle"},
    {timestamp:2.34, endTime:3.45, textContent:"this is the second subtitle"},
    {timestamp:4.56, endTime:5.55, textContent:"and so on…"}
}


…you can evaluate it as part of the source of the expression, so that the titles array is now available to the expression.

So you could do something like this with the source text property of a text layer:

try{
    myPath = “/path/to/my/titles.txt”; //obviously the path to the file
    $.evalFile(myPath);
    for (var i=0; i &lt; titles.length; i++){
       if (time &gt; titles[i].startTime &amp;&amp; time &lt; titles[i].endTime){
           titles[i].textContent;
       } else { ""; } //blank text
 }catch(err){
 “ERROR”;
} 


What that does is:


load up the subtitles file, 
scan through the titles and look at each one to see if the current time is between its start and end points
if the time is right for the subtitle to display then it sets the source text to the subtitle content, if not sets it to a blank string.


Other layers could use the startTime and endTime variables to drive other properties such as opacity or anything else you can animate.

If your subtitle time stamps are represented as smpte timecode you'll have to add a converter to the expression. There's one here.

You can use a capable text editor (notepad++, atom, sublime text, vim etc) to reformat the subtitles file, or you could use JS text processing tools (eg. regex, string.split, string.replace etc) in the script to parse the subtitles file. I'd recommend against the latter, they're going to be a lot slower. Remember that the expression is evaluated every time the frame is rendered, which includes reading the subtitles file from disk. If you have motion blur on, that could mean dozens of times each frame.