The feature I am looking for exist on MIUI rom and samsung roms:
Similar question were asked before:
This from 2015 has an answer about Samsung and MIUI roms only.
Answers to this and this question (both from 2013) offer workarounds.
An answer to this question suggested to use Wi-fi Ruller which unfortunately is not supported anymore.
It looks like the questions are rather old, and a simple, straight forward direct solution is yet to be found.