This plugin automatically disables frontend database query for Custom CSS and Customizer section for setting Custom CSS, without need to manually choose any setting or option.
It is a very lightweight, it has no settings, just activate it and it works immediately.
And it's on
GitHub.