Thank you for the abundantly explained answer!
My other question is, is the AI smart enough and does it realize that it can get mechanized units if it builds a building and then it starts producing, which it already has if it upgrades it?
I am not sure if I understood your question well.
My plan would be that the construction of mechanized units with greater combat capability could be obtained in a special way,
which would be split into two already at the beginning of production, the few countries that have a military industry would get land mechanized units in such a way that after the construction of the 'Fighting Vehicle Factory' building, by carrying out a given type of design (a small wonder), they would occasionally receive an engeener who would manufacture the a unit typical of a country's army.
At first, my plan was that the Fighting Vehicle Factory would also be a unique building (by the small wonder), because larger countries, built in several places, could build the plans with the small wonder setting in parallel, while small countries, such as Israel or the two Koreas , only one after the other (because they consist of only one city on the map).
According to another option, the Fighting Vehicle Factory should be a normal building by default, so that if a civilization loses a city where there was such a factory, it can continue planning and thus get access to the units, this is a big dilemma.
The other way is for countries to get mechanized units, which can be obtained after the existence of a military warehouse(hangar), after building weapons procurement, only here it is procurement instead of planning, essentially the same as the other, only this brings a little atmosphere to the game. After all, few countries in the world manufacture serious combat units, most buy them.
Smaller volume units can be produced nationally, such as foot units, mechanized reconnaissance units, MRAPs, towed artillery units, etc. But the infantry fighting vehicle, light tanks, MBT, self propelled artillery, TOW units can only be built in a Fighting Vehicle Factory.
The Flintlock mod holds an option, that some named units (and these can be a lot) can only be produced when there is a defined building in the city.
In general the advanced autoproduction, that I introduced with CCM, is working well for land units, sea units and air units, as this can be seen in the mod CCM, per example for heavy tanks (land units), super dreadnoughts and carriers (sea units) and dive bombers, heavy fighters, attack helicopters and nuclear bombers (air units) - and many more.
Of course upgrading a unit needs the prerequisites for upgrading them (gold, necessary resources and a building for upgrading in a city). The new R18 and R18B version of the Flintlock mod are holding a very helpful option, that units can be upgraded in any city of a civ without a special building).
It is not necessary that the basic unit for the upgrades has the king-flag. I use the king-flag in CCM for the upgraded units, that should not been built normally in the game because they are mostly "heavy units", that should only appear in smaller numbers in addition to the "normal" units in a game.
The DVD version is now installed on the my PC, can the Flintlock mod be installed on it?
Another problem you should be aware when creating a mod that massivly depends on autoproduction. Long ago Steph had a problem with his Napoleon scenario, that only should have autoproduced units. This project chrashed until he recognized, that there must be at least one unit in each turn, that can be built normally (better more units).
Are you thinking that the AI must build at least one (in this case mechanized) unit per era?
I downloaded CCM 3.0 and will install it soon, CCM 2.50 version also helped a lot, Thank you my friend for your help.