It isn’t a good mechanic if it incentivizes quitting and reloading as part of the gameplay loop. Period. If game design is a science, this is as hard as it gets.
You can maybe come up with a way to skirt the line if you can somehow guarantee that different sets of modifiers are equally beneficial or damaging, but that certainly is not going to be achieved by providing direct benefit or malus to a weapon type.
Builds are frequently set around a type of weapon. The items themselves are designed that way. I personally have a class mod that provides SMG damage. I use SMGs. If I get Mayhem modifiers that kill SMG damage, it’s BS.
My Vault Hunters, Moze and Zane, are heavily built around Incendiary and Cyro damage. Those are fundamental aspects of the classes, especially Moze who has strong incendiary damage presence in every tree. If I get modifiers that kill incendiary or cryo damage, it’s BS.
Imagine a modifier that made it impossible to land a critical hit. Sure some builds can survive, but you may as well say Zane CCC builds, Moze marksman builds, and most FL4K builds need not apply. It would effectively render entire talents useless. Imagine Mayhem Modifiers that randomly select your talents and turn them off.
None of it is engaging. It’s all frustrating BS that stifles personal play styles and builds, and introduces not playing the game, reloading, as part of the gameplay loop.
Don’t force me to play the game in a certain way. I’m going to do that on my own, IF and WHEN I choose to. Not because your half-baked nail bomb of a game mechanic, Gearbox.