I think it’s fine that’s what we are doing.
Our son has my brother and dads middle name, as well as his uncle and grandads middle name on fathers side - I like it, connects us all
I have 2 nieces and they have the same middle name as my daughter who was born first. They all after the cousins grandma.
I think it fine, our daughters first name is technically my husbands grandmas first name. But we chose it because we liked it, and I did like that connection even though she’s not named after anyone. We’re tempted to do the same again, as I’d love my uncles middle name for our boy. As he passed many years ago, and was a father figure to me he’s very much missed even 25yrs on. And our son is the first boy to be born since that uncle, so it feels quite special. However it is only happening if we think he suits the name, I can’t commit to names before I see my babies (don’t know why, just my thing)