Towards accurate cosmological predictions for rapidly oscillating scalar fields as dark matter