<div class="parent">
<div class="child style"></div>
<div class="child custom"></div>
<div class="child"></div>
<div class="child custom"></div>
<div class="child style"></div>
</div>
const parentSelector = '.parent';
const className = 'custom';
document.querySelectorAll(`${parentSelector} > .${className}`).forEach(n => {
n.classList.remove(className);
});
// или
for (const n of document.querySelector(parentSelector).children) {
n.classList.remove(className);
}