Welcome to the forum. Dogs living together are more likely to fight, and making sure your pup spends time with the other 2 regularly so they bond early will help. But I'd suggest a female. All around, both for your basenji and particularly for the Australian shepherd (who can also be testy with other dogs), it's probably your safer bet.
Where are you getting your puppy from? You might find relatives on the board. ๐