Yes, 1tech is correct about higher octane fuel. Octane is just an additive to increase fuel's detonation resistance. It's not related to more energy per stroke at all. Part of the problem with octane is it's everyday use. A movie or thriller book will be called "high octane!!!!" But you don't see Exxon or Sonoco advertising high octane as a performance booster. You can bet they would if it were true.
Unless your engine is knocking or pinging then a higher octane won't help. Knocking, which is a result early detonation, which means the fuel explodes prior to the spark plug sparking and the cylinder reaching it's highest point, will lower teh power of the engine and can be harmful to it. A higher octane will fix that by allowing higher compression before detonation, allowing the cylinder to reach the top of the stroke and waiting for the spark plug to fire. That way, all of the force of combustion will power the cylinder downwards. Most newer cars can compensate by reducing timing, which also lowers power and mpg. Conversely, they can advance timing to compensate for too much octane. Whether your ST could benefit from higher octane fuel depends on a lot of things. If your engine is constantly running with a retarded timing, then a tank of premium could make it run where it's designed.
You didn't mention how your truck was running, only that you got a code. If you're getting poor performance, then something's not right. My advice (which is probably worth what you're paying for it!), assuming you're on schedule with regular maintenance, is to run some Sea Foam through a tank, and to use only top tier fuels. You may be running on "bad gas." Bad gas could come from a gas station cheating, or just from the fact that with 1 to 2 mile trips daily (2 months between fillups?), you don't burn through a tankful fast enough. There are additives for stabilizing fuel that you could use. Or some of the things I mentioned in the earlier post could be happening. If you have underlying issues that you need to address, like catching up on scheduled maintenance, you may need a tuneup, or maybe you really do need a new O2 sensor. Either way, high octane gas is not the answer you're looking for.