Automatically generate videos from template
A script that generates a custom ffmpeg command based on inputs provided could do this. You'd need to construct a filter complex with scale/crop filters for each video and multiple overlay filters with time conditions for the compositing. If you're willing to learn and trial it out, grab the Win static binaries here and start with some basic guides.