Standard way for handling different resolutions when concatenating videos
I have written various approaches how to fix this below and you can automated the ones from the first two blocks with a clever rule set. But the content-dependent options should be done manually. So if you want to use this, maybe you find a way to tag those videos first by hand, for example by using metedata and your tool can then read the metadata and apply the correct solution. Anyway, there is no real standard way and it's not really common for professional productions to deal with clips in different frame sizes. If so, it is well planned and those scenes are usually filmed in a way that parts of the frame can easily be cropped away afterwards.
Videos with the same aspect ratio
You can downscale to the lowest common resolution if all the videos share the same aspect ratio. As you correctly assume, upscaling would not always look good. Downscaling will not be noticable to the general viewer.
Videos with different aspect ratio
If the videos don't have the same aspect ratio you have to add black bars horizontally or vertically. My recommendation is to use only black bars for 2 different frame sizes, not more. This means some videos will be full screen and all the rest will have the same sized bars. Either keep all bars horizontally or vertically. Anything else might confuse the audience too much. In case you have 3 or more different frame sizes, I recommend to manually crop them before starting your automated solution.
Options depending on content
If it works for your story, you can render mutliple source clips in the same frame, for example take 4 lower resolution clips, put each into a different quarter of the frame, maybe with seperating bars in between. It then resembles like a wall of screens. Generally this works well if you want to show things happening in parallel. One example is filming various instrument players individually while they perform a musical piece. This is also a good solution, when you have vertical videos shot with a smartphone: you could combine 2 or 3 in the same frame, just put them next to each other.
Another option is picture in picture, which is often used for all kinds of presentations, where you have either slides or a shot of the main stage filling the screen and a smaller overlay with the video of the speaker(s) near one of the corners.