To start off, I had a 100% file that I used space/time on so I could go wherever I needed to in order to setup recording. Then I'd go to the room before the segment I needed to record starts and change my equipment to match the point in the run that I'm measuring the rooms for.
As an example, if I were doing blue Brinstar going up on the way to Wrecked Ship, I'd have enabled Charge, Wave, Spazer, Varia, Speed, High Jumps, Morph Ball, Bombs. In this case I'd probably leave Ice off, as it doesn't speed up anything and you may not have it at that point in the run. However, if I were doing blue Brinstar after having cleared lower Norfair, I'd just enable everything.
I have a lua script that I originally developed to help me practice for SGDQ last year. Basically, the script will automatically save state at the beginning of a room, and then when I reach the end of the room, if this is the best iteration of the room measured so far, save a new state. Then load the state from the beginning of the room, output the best time and last time using both realtime and ingame frames. Only realtime frames are used for comparisons. When I'm done with a room, I can press a button and the script will load the state from the end of the best run through the room.
Starting with just before the first room of the segment, I'll record the segment I need at 75% speed using the script I just described. The 75% does two things: one, it negates the input lag that I sometimes will notice while playing, and two, it accounts for certain deficiencies I may have as a player. For example, when I started the project I used to have a fairly slow walljump, but I've improved my speed since then.
I record the whole room with the script, no savestates during the room. I use entire room increments because that makes it easy to measure, and easy to record. However, this is not a perfect method, as Reeve's recent investigation into the WS missile showed me. That said, I feel quite confident with the rest of my data, and the results generated. After I finish one room, I'll keep going into the next and so on until my desired segment is done. If I recognize that I'm about to do a room that I've already done in another movie with the same relevant equipment (a good example would be the power bomb area in pink brinstar; as long as I don't have spring ball, nothing changes about how I do that room,) I'll just reuse the room time from that previous movie.
I have a spreadsheet which I use to keep track of all of the times per room. There is a realtime sheet and a gametime sheet. Room times that are reused are formulas that link to other cells and are marked blue so that I know which ones I don't need to reupdate if something changes.
Certain segment times will change depending on where you come and where you go. As an example, all J segments will depend on if you still need to do the gauntlet or not. Thus if you've already done the gauntlet, J1 has a value of 11903, but if you haven't, it has a value of 11811. It is important to note that these values are practically meaningless on their own; it is only within the context of an entire route are the values actually meaningful.
Anyway, after I did that for all the possibilities that I thought were worth exploring (My route tree is listed at the bottom of that link) I used a computer program to create valid routes from all the segments (only routes that actually got 100% and didn't, for example, visit green Brinstar twice, were looked at,) assign the proper value to each node based on the other nodes in the route, then sum it up, then append the route to a text file. I then used a text editor to sort the data, because I'm too lazy to store all routes in memory and sort them before outputting. What I linked was the raw output of the program, with my route tree at the bottom.
I'm not a SM TASer; I enjoy watching the runs, and I enjoy creating theory TASes using console-type skills, but I only use TAS tools to slightly enhance my own capabilities and remove errors from my output. I'm not really interested in creating a "full TAS" of SM. So take the rest of this post with a grain of salt.
For any%, the focus of the run is defeating the four bosses, and Phantoon->Ridley->Kraid->Draygon seems the most efficient route, grabbing whatever you need on the way to each boss, assuming you could find a way to pull it off with the items provided. Grabbing the Hi-Jump energy tank (and not Hi-Jump itself) would be a few seconds slower than grabbing Kraid's, but it may be something worth looking into if Kraid can be done a few seconds faster with Speed Booster. Like I said, I'm not the expert here.
For 100%, I'd be even more lost. The only thing I could possibly suggest with any degree of seriousness is what Reeve just suggested: do blue Brinstar on the way down from Wrecked Ship, and do green Brinstar before going to Tourian. You wouldn't have charge until the end of the run, but the only things that appears to change are the Botwoon and Ridley fights; neither change is major. I'd think the gauntlet would be fine to place after Wrecked Ship, since a TAS can just short charge a spark into it, whereas a console runner needs to rely on having Plasma for the topside wraparound. I don't know for sure that switching blue and green is faster for TAS purposes, but it's worked really well for me on my console runs.
Anyway, hope that answers your questions.