Latin castellum was a diminutive of castrum, a fortified place. Middle English castel precedes the modern spelling.
Old English and Norman-Picard French mediation are compressed. The source gives French and Latin inputs into Old English; its proposed deeper link with castrare is unscored.
Sources
- Merriam-Webster: castle
Latin castrum precedes its diminutive castellum, then the selected Middle English castel and modern castle; earlier English and French stages are compressed.
- University of Michigan historical dictionaries · MED6906
Meanings of the older forms on the word path.