I use T-SQL so it may not be quite the same, but I'd implement this with a link table.
Table tPart would have field idPart plus other part info; table tGroup would have field idGroup and other group info. Then table tPartGroup has fields idPart and idGroup, each as foreign keys to their respective tables. No NULL entries needed.
Adding or removing parts in groups only updates the tPartGroup table. The foreign keys prevent deleting a non-empty group or deleting a grouped part. If a part can only be in one group, then this just adds a UNIQUE constraint on the idPart field (I assume MySQL has this). Counting parts in a group is a simple query.
Of course, if the parts are ordered in the group, then an additional field is needed on tPartGroup.
As to what's the best way...?