My judgement is that Rees Mogg and Johnson would find it impossible to find any nonConservative allies at all.
What's your reasoning for believing that the DUP would not be willing to do a deal with either of them?
Any government headed by either of them would fall at the first important division.
You're assuming that everybody apart from the Tories would vote against such a division. There's nothing to prevent a future Tory Prime Minister from doing a deal with other parties even on a case by case basis. On any individual issue, they need to find five extra votes (because Sinn Fein with seven seats never turns up and the Speaker (currently Conservative) only votes in the event of a tie).
Personally, I hope that neither Rees Mogg nor Boris Johnson ever manages to form a government. Unfortunately, reality is not based on my hopes. I don't see any reason why the DUP would withdraw from the deal if one of them did become Tory leader though. In fact, I think the new Tory leader would give them pretty much anything they ask for because the alternative would be a general election in which the Tories would probably lose badly.