TLDR: Yes, this is a classical case where the data should be added to a separate collection instead of a subcollection.
Imagine you have N participant documents under an activity that needs to be re-created, first you would have to read every participant document, delete the parent activity, recreate it and recreate all of the N participant documents again, so you would basically have:
N reads + (1 + N) writes + (1 + N) deletions
Against only 1 write + 1 deletion with the separate collection approach. depending on the number of participants this a big cost on your Firestore bill.
A couple of things to consider are
Make sure to keep the same ID of the activity document, that way you don't have to touch the reference to it in the participant documents
The participant document can have an array of acitivies it is participating in, which would make it easier to operate, so something like this:
PARTICIPANT DOCUMENT
uid: "UID VALUE"
activities: [activityId1, activityId2, ..., activityIdN]
otherField
...
otherFieldN
With this approach if you want to add a participant to a new activity all you have to do is add the activityId to that array using an arrayUnion.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…