I have seen attempts at it. One is to multiply your estimates by the number of different pieces you're estimating. So, if you have estimated for three different pieces, multiply those estimates by 3 when deciding how much the whole thing will take. If you have estimated for five different pieces, multiply the sum by 5, etc. The idea is that the more estimates you have made, the more likely that at least one of them will "blow up" and take far longer than expected.
Generally speaking, though, software is far less advanced than civil or aeronautical engineering in this kind of thing.
That strategy seems hopelessly sensitive to the exactly granularity you calculating things at. If you have four tasks each with four subtasks and you think each subtask will take 90 minutes, should you really be budgeting an entire quarter for the project?
Bake in a factor of safety into your estimates depending on the type of work, the track record of the team that’s doing the work etc