Render some pages only in non production

INMHO, this sounds quite vague.

Here is one approach:
Let’s say, you have 3 sections: sec1, sec2, sec3 and you have the following structure for config files:

├── config
│   ├── _default
│   │   ├── config.toml
│   ├── production
│   │   ├── config.toml
│   └── staging
│       ├── config.toml

1st you should make use of site.Params.mainSections in your template.
2nd specify different mainSections for each of the config.toml files.

For example, say you have the following in production/config.toml:

[params]
mainSections = ["sec1"]

Then Hugo should bother about sec1 in production environment.