I think this is still possible. We achieved something like this some years ago for the (now deprecated) Team Foundation server: We created a custom Visual Studio Extension with a checkin policy, then activated this policy once per Team Project, and the policy is executed for everyone that works with this Team Project. This policy still works with Azure DevOps Server 2022 (on premise)
I don't have a tutorial link at hand (most guides in the web might be outdated), but I could create a sample if it is still relevant.