It wouldn’t take that long at warp 5. And warp 5 is just below the cruise speed on the TOS Enterprise (warp 6).
“According to the Star Trek episode writer’s guide for The Original Series, warp factors are converted to multiples of c with the cubic function , where w is the warp factor, is the velocity, and c is the speed of light. Accordingly, “warp 1” is equivalent to the speed of light, “warp 2” is 8 times the speed of light, “warp 3” is 27 times the speed of light, etc.” (Wikipedia)
Thus, warp 5 = 125 times the speed of light. Just over a year to travel 127 light years. (I know they messed with this formula for NG, and Voyager.)
The Enterprise maxed out at warp factor 6 (unless the plot called for higher speeds) — but, Scotty would have objected (he always under-promised, and over-delivered).
Next, you’ll be telling me that the Enterprise couldn’t have obliterated the Death Star. :-)
You take the slow boat - TOS Enterprise, I’ll take the fast boat - the Culture’s “Sleeper Service” with assist from a superlifter and be there in a day. We’ll keep the lights on ...