I pay about 0.38€ per kWh and thinking of 8 hours per day usage, compiling heavy Rust and C++ projects, gaming at night. I could get my electricity prices down to 0.24€ per kWh if I'd spend some time switching providers every year.
The 1950X (16-core) is now about 760€ here in Europe, and the upcoming 2950X (16-core too) seems to go to the same or a bit lower price point. Now the price of electricity is already a much larger percentage of the purchase price, but the convenience of cutting time out from the compilation might be worth it.
Of course with so many cores, it is a good idea to get 64 GB of RAM, which adds to the energy bill. A template-heavy C++ project will eat RAM for breakfast, `make -j8` and 16 GB will definitely swap.