I don't think strictly locking weapons with classes is a good idea. This is an FPS, not a MOBA. people want to use fun weapons regardless of class. I want to use shotgun in a close-quarter infantry map, and I don't want to be stuck with a repair tool. For the same reason I strongly oppose faction exclusive weapons. Nobody cares about factions, especially when there isn't even a campaign to show what the hell those factions are about. This is just locking guns behind arbitrary criterion.
Part of the reason the balance is so bad in the Frostbite games is because of how generalized the classes are.
In BF4 everybody who knew what they were doing played Engineer (or Assault if the map had no vehicles), because all-class weapons meant that every class was more or less equally good at killing infantry. Why would you play recon when every class can equip a DMR? Why would you not play the class with the best anti-vehicle weapons if not because their infantry weapons are worse? BFV has the same issue, all the weapons (except smgs RIP medics) are good at all ranges so everybody just runs Assault because they can bust tanks as well as infantry.
BF1 was the first time since the first Bad Company game that there was actually a reason to run every class, and a lot of that is because they got rid of all-class weapons and made it so each class has their own preferred engagement range.