You would need to write a script that would work like Adobe's Data Driven graphics. That supports Smart object layers and come up with some way the define smart object layers as a variable. Photoshop variable only support three types of variable layer. Text layers for replacement, normal pixels layers for image replacement. And Layers that you can control their visibility.
Data Driven Graphics does not support replacing Smart Object layers content. With Data driven graphics you can only control smart object layer visibility.
There are also Problem replacing Smart Object Layer contents using Photoshop Scripting. There are two ways to do it.
One is to use Photoshop Feature Layer>Smart Objects>Replace Content. The replacement file must exactly like the object in the template Smart Object layer. exactly the same size, aspect ratio and print resolution. For the Smart Object Layers associated Layer Transform is not changed or updated when the object content is replaced.
Two if the replacement files are not the correct size, aspect ratio and print resolution. You can use Photoshop's feature to open Smart Object Layers Object. Then you can fit the replacement file into the existing object. You can not change the size of the object for the associated smart object layer layer's transform is not updated. There is an additional problem because all smart objects will not be opened in Photoshop. Placed vector files object will open in a vector application like AI. And place a RAW file or RAW file opened as a smart object layer will open in ACR the script would lose control and not be able do the replacement. The Script would need to bypass replacing vector objects and RAW objects if the template has those kind of objects.
I also do not know if a Script can see which layers are Photoshop defined variables. You may need a different method to define replacement layers. Like a some Layer naming convention in you template psd files.
If you want to change rotation you would need to edit the smart object layer associated transform which currently can have rotation and warping settings. I would not know how to automate modified an existing transform that has sizing warping and rotation. Photoshop's Data Driven Graphics does not support inage rotatioj
Script can read and write CSV file. I will be quite a task to develop such a jsx.