They may have done that. It may have made it clearer to them that they were transferring over a lot of trust to someone else, and they might have taken it more seriously and used a different approach. It can be helpful to have more friction for something like this.
That's true, but I have the (perhaps wrong) impression that most people would take handing over control of a signing key more seriously than a repository on GitHub or a package on npm. It very explicitly involves trust / security so it's harder to ignore what should be obvious.
I think security and trust genuinely aren't on the radar of most developers. If they'd be more explicitly forced to consider that they were transferring over the trust placed in them by their downstream users, I think it's quite possible they would have done things differently.
I think you overestimate how much an explicit ⚠️ SECURITY ⚠️ flag affects the class of developers who will hand over entire ownership of their repo and publishing authority.
I don't mean a warning flag but rather something like a public log of added collaborators and requiring the owner to write a summary of why they're adding them just like they do for commit messages. Not entirely sure but I don't think people watching the repo even get notified.
Can't know if anything would have made them reconsider and made better decisions. All I'm saying is that it's incredibly easy to hand over control without giving it much thought. There's very little friction and it's presented as something very casual and harmless.