As proposed I reposted this question to Unix & Linux SE and I got a solution for my problem.
The main difference between my minimum reproducable example and sudo is that sudo modifies the group id as well. In my code I have just modified the user id with setuid(). In connection with the ACL settings for group permissions
getfacl /etc/
# group: root
group::---
other::r-x
this leads to the opserved problem.
So I could solve the problem by switching the group id with setgid() in my program as well. After adding this to my code the program has access to the configuration file after dropping root privileagues.