Constructing Siege Engines (5e Variant Rule)
From D&D Wiki
Constructing Siege Engines
Wooden siege engines (e.g. ballista, trebuchet, siege tower, couillard, springald, mantlet) are sometimes built on-site using materials from the land around the structure to be besieged. This might be timber from felled trees, or pulled from houses. Alternatively the devices can be built remotely and in advance, then broken down into a major components, to be transported and re-assembled at the target site.
Costs are about 10x the HP of the device, e.g. a 50HP engine would cost about 500GP to make.
Creation time, by default, would be one person-day per 25GP of cost. Therefore it would take a five-person team four days to build, from scratch, a 50 hit point wooden siege engine. This is for a team of casual laborers under the supervision of a single, proficient foreman -- the DM may allow you to shave down the time if you can add more proficient craftsmen to the team instead of ordinary laborers.
Construction can be hurried, halving the construction time. This requires at least half the craftsmen to pass a DC 15 Constitution (Endurance) check. If less than half the craftsmen pass the check, the construction time is not reduced and all the craftsmen gain one level of exhaustion.
Siege engines can be constructed over a longer time period with fewer workers, or in lesser time with more workers, with the DM deciding the minimum and maximum headcount that is practical for constructing the device in question.
Re-assembly of pre-built siege engines is much quicker than the initial construction, of course; a number of minutes equal to the HP of the device would be a reasonable estimate, provided there is adequate "man-power" for the job.