First note that Trick Room reverses the turn order in battle by speed: for example, Pokemon with 200 Speed move before those with 300 Speed in Trick Room. However, there is a way to bypass this if you are using faster Pokemon. By using moves such as Agility that multiply the user's Speed, you can outspeed those in Trick Room. You will need to have an effective Speed stat of 1809 or higher to do this: that means your Speed must be quadrupled (raised six stages, like 3 uses of Agility).
This, however, can only be done with Ninjask and Deoxys's Speed Forme, even with this maximal boost in Speed, a Speed-boosting Nature, and maximum IVs and EVs in Speed. The use of a Choice Scarf opens this up to many more Pokemon, however: with a Choice Scarf and Speed that is raised six stages, any Pokemon with 302 Speed or more can make use of this glitch.