I have to say, I really don't want to read the 50 odd posts that came before mine, but i'll just be talking about the OP.
I agree with what you say on what's wrong with guns. Total RNG is a bad thing, you're forced into playing a specific way if you roll the dice wrong, and end up with things you don't want, when realistically, you could probably just buy a decent gun, or build your own. Turret factory turrets generally being worse, as well as obnoxiously hard to acquire, is terrible.
I think going the way of customizable turrets like so many other games have is a good idea, but the way you're attempting to implement it is far too complex for Avorion. One of the most complex games of this style, is probably From the Depths. So I'll use that as a comparison.
From the Depths is obviously known, and quite fun, because of it's high complexity and depth in designing. You have to deal with so many different factors, even just the basics such as buoyancy, mass, thrust, center of mass, and how they react with each other, is a lot. Then you have the engines, which I don't even understand beyond basic engine designs. Then you have Avorion, there's no respect to realism in this game. You have basic blocks that abstract things, such as the Generator, Thruster and of course, the guns. In Avorion, you have one single block that handles power generation, no strings attached. More generator = more power, while on the other hand, From the Depths has something like 8 or more blocks just for engines, which all interact in different ways. It's the same with the guns, which is the direction you're attempting to take it.
My point is, Avorion is a game that values simplicity and abstraction, while FTD values complexity and depth. So, while I think going towards customizable turrets is a good idea, I don't think implementing it in such a complex way would be healthy for the game. Instead, the current building style should just be used for turrets, while still giving players the freedom of designing it however they want. In a way, a compromise between Starmades 1 block type per gun, and FTDs 15 block types per gun style. So you want to build a turret, for say, a cannon, you have 5 or 6 types of blocks you can put onto it. They each do a thing, and interact with each other in basic ways, but no where near the deep interactions of FTD.
So what sort of blocks would a cannon have, aside from basic hull blocks? Well, basic cannon stuff. You have a barrel, which determines the size and speed of a projectile. Heatsinks, for increasing overheat capacity. Radiators for dumping heat faster. Some sort of stabilizer for increasing accuracy. A "Loader" block that increases fire rate, but decreases accuracy. Maybe another block that lets you trade one stat for another. Overall, it's a very simple design that still offers a large amount of freedom, and fits within the scope of the game, i.e a simple building system. In comparison to FTD, where you can spend literal hours tinkering away at a single turret.
As another user has said, this could take away from the RPG mechanics of the game. And I have to say, that's an entirely valid point. But there's an easy way you could fix that. Add RPG mechanics to the custom turrets. Now, this could use some discussion, but I think a good idea would be something like this. You build your turrets like you do with ships, they're generic, basic, un-rpg'd blocks. But rather than random guns being part of the drop table (Although they still could be, but rarer), you get random parts. They have random stats, and a random size, and you can whack that onto your gun. But then comes the issue, either you can resize them and that'd be severely overpowered, or you only have one block and it's just, why? So why not do something like this. You can resize them, but it costs a special resource that can only be acquired from deconstructing parts that also have their own random stats and effects, with cost varying based on those. The cost of resizing it would also scale with the stats, so it would be much harder to make your +15 Spreadshot 2x Speed Homing Splitting Projectile barrel larger compared to a +1 10% slow barrel or a +2 Accuracy-Scales-With-Firing-Time stabilizer.
Now to respond to some things Koonschi has said, along with some of the things Sable Pheonix has said.
The looting system definitely does not have to be obsolete, just read above. You can easily re-use a loot drop system for a custom weapon style. I also have to disagree that the current system is in any way fun. It's mostly frustrating because you are forced into specific play styles because no good type of weapon X will drop, if it drops at all, while you will also be able to find better weapons and parts with the above system. It's literally the current system reworked for a part-based system, rather than a whole turret one. I also have to say this, what matters is your implementation, not the feature itself. You've implemented the current system terribly, it's not fun. The "Enchantment" system is entirely random and in no way fun, as compared to ones you have more control over in every other RPG/MMORPG.
It would be fine to balance. First off, the most glaring issue. As Sable Pheonix says, the biggest issue in game balance right now is shields, and to a lesser extent, integrity fields combined with shields. You can get absolutely insane HP buffers because you have 3 million + shields, which with the relatively low DPS of most weapons in the game, puts your time to kill up to insane amounts. Sure, shield penetrating weapons exist, but an integrity field makes this point all but moot. Your 10,000 EHP hull blocks do not care for the few bullets that get through. Shields need to be either utterly nerfed, or removed entirely to even begin thinking about weapon balance. If anything, I think something where shields have an overall high HP, but are cut up into segments (Also is a bubble that you can fly inside, so bomber-type ships become immensely useful.). The only difficult stage of the game is the very early game, and that's only if you take the time to fight ships, as I went over in my own thread, progression and combat in general is very poorly implemented.
As for enemy difficulty, that's something I also covered in my own thread, but I may as well go over it here, too. First off, I don't know how the random enemy patterns are done, but I'd really like to know, because it sounds like it could be fun for players to tweak. Enemy ships are always long, spindly skeletons, rather than anything beefy, which doesn't help. But the actual issue, aside from their overall design, is the ratio of parts. For some reason, every single ship within the AI's possession moves at an astounding 100M/s and has very little, if any, turrets. The tankiest ship I ever saw was a mining ship, which I watched for a solid 10 minutes as an alien fleet attempted to kill it. It got to 50% HP and I eventually warped out, see above issue with shield balancing. The player, on the other hand, is completely able to deck their ships out in turrets, and move at a leisurely 600M/s or more, putting anything the enemy ever hopes to field somewhere behind in the last million miles.
So in short, the issue is that you're not attempting to rework the current system in a way that would work with a custom turret build style, and instead are just saying it won't work. Balance will be entirely in your hands. But also, that the weapons are not the balancing issue of the game, it's the shields. There is an immense gap between the strength of shields and weaponry, it, frankly, makes the game incredibly unfun.
But lastly, as Sable also said, you need to remember who your audience is. You gave us a game where you're able to freely design a ship however you please, and obviously, that's what we like. So why would you say we wouldn't find it fun? The game is quite literally founded upon that, and that's what your selling point is.
I love all those mechanics. I love RPG loot mechanics, I love building my own tools, ships and weapons, and I love crafting and surviving in an unforgiving world. Avorion is the closest game I've played in that regard, and I'd really like to see it reach the full potential of that.