No, because Douglas-Home was a member of the House of Lords. Johnson would need to be elevated to a peerage, but basically he’d be toast if he lost his Parliamentary seat.
Douglas-Home was a Lord when he became PM but he wasn't while he ran for MP which seems similar to me to Johnson loosing his seat while PM and having to find another. I suppose Douglas-Home wasn't rejected by the (local) electorate in the same way.
I don't think that is correct.
There is no legislation that created the office of PM and therefore there are no rules as to who can hold the post.
Douglas-Home became PM in '63 when he was a Lord. A safe Tory seat was rapidly vacated so he could become an MP but it wasn't strictly required.