Building custom hardware for programming boards with microcontrollers
PCB testjigs are very common, you will find plenty of suppliers that can provide a custom interface based on a laser-cut standard chassis for this exact purpose. They are not very expensive.
These are typically a &quot;pogo-pin&quot; bed with a piston or frame that guides the PCB down on the &quot;pogo-pins&quot;. (or the other way around - PCB sits still while the pogo-pins are lowered.)
Found a quite nice article here that has several illustrations:
https://www.bunniestudios.com/blog/?p=5450