If you are willing to write Python code, then it's not too hard.
Save your workbook as a TWBX.
Use Python to open the TWBX as a zip archive, remove the CSV, put in the new CSV (it must have the same name), and save the zip archive.
You shouldn't have to touch the TWB.
You might want to remove any cached data from the TWBX archive. Just edit with a ZIP tool and make sure it contains only the TWB and CSV.
There might be a better way to accomplish your overall scenario.