you can implement this in 3 steps:
1) make a self referential relationship of task entity.
2) You need to do auto numbering in your sub tasks intellectually, so that you can make a differentiation between parent task and sub task.
for example: parent task name: Task01 sub task namesub-task01 and sub-task02
3) To implement security role, you can use access teams. By help of access team, you can associate lists of user that can view that record.
For example task01 can be view by user 1 and user 2 . sub-task01 can be view by user 1 user 2 and user 3 and sub task02 can be view by user 1 user 2 and user 4. So user 3 cannot view sub task 02 and similarly user 4 cannot view task sub task 01. Finally user 3 and user 4 both cannot view task 1.
Hope it helps. If still confuse, share your email id. I can contact you there.
If found useful, please mark the answer as verified