I agree that Johnson was inspired by that, but there are differences. Obi-Wan stumbled upon Vader in the corridor, which happened to be adjacent to the docking bay, and started dueling with him before Luke and company even entered the bay. He wasn't stalling so that his friends could escape. In fact, when he saw Luke, he stopped fighting and allowed Vader to kill him, which then turned all of the Imperial attention to Luke and company, almost ruining their escape. Also, luring five Stormtroopers away from the Falcon wasn't really life or death stakes or the climax of the movie. I'm sure that Johnson was inspired by Obi-Wan's sacrifice, but the scene plays out in circumstance and importance more like Gandalf's, IMO.
It's not the same scene obviously, but you're focusing on the less important things here. Obi-Wan knows Vader will be drawn to him, and bets on that to make sure he can't find Luke, but really the big big thing about this is that this is how Luke decides to die, and he obviously mirrors his mentor.
But even so, it just shows that the Jedi were always more space wizards and there's really nothing different about now. Obi-Wan is exactly that in the first movie, and sacrifices himself in very similar way to Gandalf in LOTR... While also becoming more powerful for it. It builds on that trope right from the start. Luke's death is also extremely similar, but the hook there is that it's the end of his struggles to understand his place as a teacher, essentially his arc in the film. And it's obvious that in both successes and faillings his main inspiration was Obi-Wan.