How well does the AI design ships?
It's decent. Some of its designs are good, some are bad, but most are just average. For example, here is a end-game design I saw the AI use in my mod: 2 HyperWarp Drives Mk. III, 1 Ultra Life Support, 10 (Ultimate) Invulnerability Fields, and the rest of the space was used for Doom Rays.
I remember it never wanted to build engines, and sometimes otherthings. Has anyone figured out how to make it use these things, or fleet modules?
It most certainly uses engines. In one of my games, the Yor used troop transports with four engines. That was a pain to deal with.
As for fleet modules, I have no idea how to make the AI use them. Someone suggested to make templates using fleet modules, but I don't know, if they had any success.
How well does it utilize range and sensors,
It does use life support modules, but not to the extent I'd like it to. I don't recall it using sensors though.
and if I change how they work in the game, how will this affect them?
Not much, I'd say. I made some pretty big changes to the life support techs and modules in my mod, and the AI copes pretty well.
Will the AI know what to do with custom alternative modules, along the lines of the Arcean's smaller constructor component?
Overall, yes. However, I'm not sure, if the AI uses the Lite Constructor module. At least, I don't recall ever seeing the AI use it.
How much can we alter weapons and defenses?
We can change their damage/defence value, their category, their cost and size, what model they use, their animation and sound effect, and their flavour text. I probably forgot something, but that's basically it.
Can we create scaling damage? Can we give them effects other than direct attack or defense, armor which increases hp for example?
No and no.
Has anyone found a way to effectively slow down militarization so that economies have more time to develop before the arms race, or else don't neglect everything else in favor of an entire weapon tree?
MarvinKosh had pretty good success in his mod. However, that required a complete re-write of the tech trees and big limitations to the planetary improvements you start with.
To what extent are anomalies hardcoded?
You cannot create new types of effects, or change how an existing effect works.
Is it possible to alter their effects, or imitate their effects?
Alter how big of a bonus/penalty they provide? Yes. Anything else? No.
Can you imitate the effects of mega events using technologies? Can you imitate the effects of treaties, or design new ones?
No to all of these.
Can we change planetary events?
Yes, to the same extent as anomalies.
If you haven't already, take a look at the official modding guide. It can more easily show you what is possible to change. However, the guide is a bit outdated (it was written for DL) and not entirely exhaustive.