To be fair if we do include the 29th-century Q-lite/Time Lord-lite federation that could be a very big X factor. As regardless of it's nature, Starfleet could backtrack to whatever events caused the warp to become the chaotic monstrosity it is by the time of 40K and manipulate certain events...