By the letter of the rules, it would work.
The material component is:
a vial of blood from a humanoid killed within the past 24 hours
The blood has to meet the condition of being from a humanoid who was killed within the past 24 hours, regardless of the current condition of the humanoid or the time of collection.
By the spirit of the rules, it seems unlikely to work.
What's the point of the material component in this case? The blood is used 1) as part of the casting but also 2) to paint a circle that acts as a barrier to contain the otherwise hostile demons.
Effectively, the caster has to be willing to kill someone (either directly or by proxy) in order to summon the demons and to be protected from them. The caster is trading someone else's life for their own safety in order to summon "incarnation[s] of chaos and evil" (as the demons are described in the bestiary of Mordenkainen's Tome of Foes).
It seems obvious to me that the caster has to commit an evil act to finagle a benefit from the spell. Killing for the purpose of summoning evil creatures to do evil things should be an unambiguously selfish and evil act, but a kill-and-resurrect method of acquiring the blood (possibly even from a consensual blood donor) would seem to go against the spirit of that commitment to evil. This seems like a way to have your demon cake and eat it too.
As a DM, I might rule that the spell just fizzles or that the containing circle doesn't function because the blood provided failed to comply with the implied thematic requirement that the caster commit to their evildoing. I would consider the kill-and-resurrect method to be an exploit of a technicality of how the rules are worded in violation of how they seem to be intended.
I would consider similar complications for other exploits, like trying to resurrect the person after using their blood only to find out that the resurrection doesn't work or the person returns different or corrupted due to yanking the demons' collective chains. This would actually make a fantastic plot hook, but only if the players understand the risks going into it.
Your mileage may vary if you think that kill-and-resurrect is chaotic evil enough to work or that the blood merely needs to have been tainted by the duress of undergoing death, but I think demons are smarter than that, given their "fiendish, subtle shrewdness" (according to MToF's overview of the demonic point of view), and that they would consider kill-and-resurrect to be too vanilla.