>>42498320
If you don't want to imagine Twilight and Thorax doing anatomical studies in the treebrary after the epilogue, you can just headcanon that Thorax is 110% gay and Twilight was consumed by moonlust watching Luna dance at the wedding. Then the friendshipping is good.
Thorax himself did get better later in the story, though.