Watch this. Do it at double speed, takes only 10 minutes.
Step one. Establish a scale. Don't base the scale on the size of lego figures; that would make the whole castle at the base no more than 25 ft. square. Lego is designed to build vertically; we could argue that the horizontal scale is 3:1 the vertical; this would make the make the castle, oh, approximately 75 ft. wide and 42 ft. high. Doesn't matter exactly what the scale is, however; each person's free to decide for themselves what the best scale would be.
Step two. Weigh every piece. Every kind of piece, I mean. They don't weigh much, but a precise scale can be obtained ... or a large number of the same piece can be weighed together and divided by the number. Lego names every piece, so a nomenclature exists — for all I know, it might be possible to get the amount of plastic necessary to make each piece.
One could possibly identify every piece's volume by sinking the pieces in water, but with surface tension you're bound to produce bubbles if you don't add soap or detergent to the water. And again, you've got to work to get exact volume displacements for each piece.
Our best approach would be to clay up the hollow interior of each piece to determine it's water displacement as solid objects. That is a step better.
Step three. Okay, we have a scale and a weight for every piece. By calculating the piece's displacement in water we know the specific gravity for each measure is 1. This means we can calculate the weight of the piece, in our scale, if it were made of marble, granite, iron, lead, wood ... whatever. That means we can get an near-enough exact weight of each piece whatever the material it's made from.
Step four. Have the player build his or her castle in whatever way they want. Record the pieces being used, so that an accurate accounting of total materials needed to build whatever the final product happens to be is enabled. We know the volume of materials, so we can easily calculate cost of materials.
By establishing an amount of time needed to place each piece, we can calculate a building time also. One fun way might be to time the player as he or she goes through the process, complete with puzzling out the design and reversing decisions made. If the individual takes, say, two hours to assemble a unique castle of their own design, we can argue six, many nine months per hour ... 18 months to build, including making up the plans (the puzzling time for the player). That's 4.5 days per minute.
And once paid for an built, if the character wants to make a change that involves dismantling any part of the castle, they can take their structure apart and put it back together ... at a cost of 13.5 days per minute. Changes that merely add on can be calculated at 4.5 days per minute.
Of course, those are my numbers. Someone else can charge 3 or 5 or 6 days per minute. Or only a double time cost for dismantling, not triple. Times can also be adjusted based on the amount of metal, wood, stone and what else is being used.
Step five. Siege. The enemy targets specific pieces in the lego structure, which are removed when hit. Each siege engine is empowered to destroy a certain size and quantity of lego structure on each hit, depending on the material the lego piece represents. Destroyed pieces are permanent; for replacement, see time and material cost above.
Conclusion.
Solves the siege problem. Seems like a fun process for the player. Can be used to build ANY structure out of ANY material. The only serious issue I see is that once the structure is built, its plan has to be carefully recorded, with duplicates filed with the DM, before the pieces can be used to build something else.
I'd do a test run except, at the moment, I don't own any lego.