Unless you get a rack designed for your folder, it may not fold well with a rack. They also get a bit heavy with motor.
The bottom brackets on mine were 68mm long, perfect for a mid drive, but I installed hub motors. You will need to make sure that your mid drive front gear and the derailleur's gears match your desired speed range, but since you already have a folder, you know this.. With hub motor and a 46T/11T ratio, my folder is limited to about 18 mph with fast pedaling. That's generally fast enough for me. Rim brakes are sufficient, in my opinion.
I don't know the TDS options as far as voltage, power, and throttle. Do your research.
For batteries, I use cheap 36V hoverboard batteries (100 wh) to go about 12 miles at home. For longer rides, I have a 52V Luna Mini (300 wh) and a 36V bottle battery (320 watt-hr). The latter are good for 25+ miles. I think. The nice thing about hubmotors is that I can use a controller that is flexible with battery voltage. Mid drives are less flexible, tying you down to one voltage. I would prefer a 48V battery in that case.