As an alternative, following your idea of an taper-based solution, here is an idea. The only thing that needs to be established is the correct Axis (parallel) to the buildings. At least they should sit in the middle, Axis Center can do it—even with many at once.
The idea is to just create the amount of Taper Deformers and connect them to the Splines via Matrix. The Link List is limited to 1,000 objects last time I checked. How to get 1,000 taper objects, I copy one, then the two, then the four and so on. It is normally nine steps to get 1024 of them. So for your 5K you need five of those set ups.
Which means, a group of Splines needs to be the same amount.
The Iteration works then from 0-999.
The most Nodes in the provided scene file are in an X-Group, just to feed in the P.Y adjustment into the matrix. I have used a group here to make is simple. Click on the XP-null to use the User-Data - slider.
The Selection Object helps to select the Taper Deformers and set up large groups (1,000) at once.
=====
Once the XPresso has worked, uncheck the Enable option (Attribute manager) and check the result. In the provided scene you will find that “…Spline1.2/Taper2” will create a weird roof. (Perhaps 31 as well, but that is not so obvious) If the XPresso is off, you can move that single Taper. (It moves back if XP is enabled!
The Taper needs to be “Within the Box” and the Extrude Might have two or more subdivisions. The Spline is set to Linear and no intermediate points, compare the file 01 with the 02.
My best wishes