You could remove
Code:
<Build>
<BuildType>BUILD_FORT</BuildType>
<bBuild>1</bBuild>
</Build>
from the unit's <Builds> in CIV4UnitInfos.xml
You could also remove all the </TerrainMakesValid> from the Fort's define in CIV4ImprovementDefines.xml
The easiest way would probably be to change <Type>BUILD_FORT</Type>'s <PrereqTech>TECH_CONSTRUCTION</PrereqTech> to <PrereqTech>TECH_NEVER</PrereqTech> in CIV4BuildInfos.xml
If you like, you could then add a spell to let a human player still create forts where he wants them without letting automated workers ever build them.