The following upgrades are the best for any gun: Frictionless Materials X (28% heat damping, +7% damage), Kinetic Coil X (28% weapon stability, +7% damage), and Slegdehammer Rounds X (50% weapons force, + 60% poison damage, - 20 heat damping). Overall, the weapons stats you will end up with are as follows: 14% damage, +28 weapon stability, +50% weapon force, +60 poison, +8% heat damping. The poison damage also prevents shield regeneration. Also, any of the following combo of any grade is the best.
For the most powerful weapons in the game, use the following builds. For assault rifles, shotguns, and pistols, use Frictionless Materials, Scram Rail, and Inferno Rounds. Once you can get the "X" level equipment, these will be the most powerful weapons in the game. The combination should be used at any point you find these materials. For the sniper rifle, use two Frictionless Materials and High Explosive Rounds. The assault rifle will not overheat much at all, but for an assault rifle that doesn't overheat, you can use two Scram Rails and Snowblind Rounds. It is not as powerful as the first method, but nonetheless efficient.