I see 2 methods to solve this issue :
1 ) Find the root origin of the corruption
The only case of SD corruption I met was linked to unwanted reboots, always power-related. Did your system shutdown when you plug the last HDD ?
Are you sure that your USB Hub has sufficient electrical specifications to handle both HDD ?
2) Use a read-only filesystem:
If the cause of corruption can't be identified, or can't be solved, you may want to use a read-only file-system.
The aim is to use your
/boot partitions in read-only mode. Putting your main system in frozen-state protect it from corruption. The whole SD card don't have to be read-only, you still can have a read-write partition made for storing datas (which still can be corrupted !).
When you need to edit your system file (configuration of some service, i.e.) remount the target partition in read-write mode, do your work, and put the partition in read-only mode once done.
If the protection of the stored data is important too, you may want to use a tmpfs partition (RAM stored memory), and sync it from time to time to a read-only partition made for storing datas (putting it in read-write mode for a very small amount of time, reducing the risk of corruption)
Switching your system to read-only is a bit tedious, as you will see in the tutorial, you should make a backup of your SD-card once done.