Goerss--Hopkins obstruction theory via model ∞-categories