Is it possible to have two pokemon with very close speed stats not always have the faster one move first?
I'm not sure how this could be worked out, though. Before each turn, each battler could have its speed stat multiplied by a random number from 100-to-110, so that something within 10% speed has a chance to end up with a higher number.
I always thought it was weird how the difference of 1 point in this stat would absolutely dominate the way a matchup works.
That sounds very do-able. I think you'd just need to search for the method that works out the order that the Pokémon will move in and make the adjustment you're suggesting. Maybe try searching for things that affect the order, like Quick Claw, priority, or speed?