Whether to use an ArcGIS model as a geoprocessing service, or to write a Server object extension, will depend on the audience for the model/script - so I would first try to write a Python script that works on a test case.
The simplest script that would seem to do what you describe would be able to take just two parameters and create the result. Those parameters would be a feature class (already projected with units of metres) and a distance between lines.
The pseudo code would then be something like the following:
- Determine extent of polygon(s) in feature class and set variables xMin,yMin,xMax,yMax
- Create a new line feature class with same coordinate system as the polygon feature class
- Write line geometries into the new feature class - first line is xMin,yMax to xMax,yMax, next is xMin,(yMax - dist) to xMax,(yMax - dist), etc until (yMax - N*dist) < yMin
- Clip the line feature class (which will be series of horizontal lines) using the polygon feature class
- Use Summary Statistics to add up the length of the lines in the clipped line featureclass