I too doubt very much you could have done any better. Look at it this way, unlike many others you manged to get yourself out of a mess, sure there was a cost, but far better peace of mind.
Because of all the talk about trackers everybody now things they have lost out, it's not actually true for many people, some of us, me included, never even looked at trackers and they were available. You cannot always get the best deal and you get the one that suits you at the time generally.
Don't see how you could have kept your tracker as it was in joint names.