Parent/child (aka ancestor/descendant) relationships aren't relations, which is what the "Related to" (and the relatedTo
query param underpinning it) works with. In other words, it's not possible to create a "Related to" condition that does what you need it to.
Unfortunately, neither Craft 4 or 5 has a "Descendant of" condition type. Sounds like a valid feature request, though!
If you really want to pull this off, the only solution I can think of is to create a custom Yii module, with an event listener for the EVENT_DEFINE_SELECTION_CRITERIA
event:
use yii\base\Event;
use craft\fields\BaseRelationField;
use craft\events\ElementCriteriaEvent;
Event::on(
BaseRelationField::class,
BaseRelationField::EVENT_DEFINE_SELECTION_CRITERIA,
function (ElementCriteriaEvent $event) {
$field = $event->sender;
if ($field->handle !== 'entryFieldHandle') {
return;
}
$event->criteria['descendantOf'] = 306;
}
);
Finally, as general advice you should avoid hard coding entry IDs anywhere in your build. Entry IDs will typically vary between environments, so a better approach is to either use environment variables, or an entry query to find the proper entry without depending on a hard coded ID.