Check out this recent post of mine:
I imagine that your subtasks are recorded to a log?..You could create condition that looks for all 3 subtasks per task and only then award the badge? If you prevent users from clicking a submit button more than once (explained here: How To: Build a Gamified Glide App (updated 10/6/20) - #10 by Robert_Petitto), then maybe you only need to record the main task ID and count how many times that task ID appears for each user (if 3 then award badge).
Just thinking out loud.