I'm using a Sonoff Zigbee 3.0 dongle (available on ebay for $20, uses a TI Zigbee chip) plugged into a small single board computer server. Zigbee2MQTT is FOSS software which interfaces with the Zigbee dongle and manages the Zigbee network. You can pair devices to the network with with its web GUI. Zigbee2MQTT allows you to control the devices over MQTT, a lightweight messaging protocol. I wrote a Python script for this. It connects to MQTT and listens for messages from the buttons (on, off, brightness up/down, CCT up/down). When it gets a message from a button or motion sensor, the script sends a MQTT command to the relevant bulb / group of bulbs.
My setup is all Ikea Tradfri, but I could very easily add in Hue bulbs or other Zigbee devices such as ones from Aqara or Sonoff. I just purchased a Zigbee thermostat but haven't gotten around to setting it up yet. The whole thing works without internet access. Though you could expose the MQTT server to the internet and set up a method to control your devices when away from home.
The main risk is that the industry moves past Zigbee. It's already moving to Thread & Matter, but I've only done a bit of research into that. I think Zigbee will be supported and products will continue to be available for a while. Or a self-hosted Thread software might also end up existing.
The tradfri bulbs don't dim to 0.1% but they get pretty dim. And your control software could do things like selectively turn off certain bulbs in a room as you command it to lower brightnesses. The CCT range is good enough for me. The Tradfri bulbs are specified as >90 CRI. They don't flicker.
Good news, there's no lock in with Hue. I have about 20 of those bulbs around my house and they all work great with the generic Zigbee coordinator attached to my Home Assistant box. I don't use the Hue Hub, nor do I use the app.
Alongside those bulbs I have another 15-ish Sengled bulbs that also speak Zigbee. They're cheaper and similar in quality, but the color temps don't get as low as Hue. (2700K vs. 2200K on the Hue)
Only caveat with the Hue bulbs is that if you need to reset them for any reason, you'll need either a Hue Hub or one of their dimmers to do that. So I guess there's a little lock-in on that front, but it's not an ecosystem thing where you're stuck.
What options are you looking at? I will probably be looking into some of these soon.
My issue is that there are several competing control standards (with 0-10V being the more common but primitive one for America), and plenty of them (like PoE Ethernet lighting - super cool IMHO) are very much commercial-only. And stuff like Lutron's RadioRA is quite proprietary, with not much interoperability.
On the other hand, going with Phillips Hue or similar will lock me into that ecosystem - which also dictates which lights and switches I could use.