Sorry, I just realised that I may have misunderstood your question, however, I can see why you would want to prevent certain apps to stop the screen-off to occur, but I don't see why 'certain' apps would need to keep the phone from going to sleep. For example, any system apps or communications tools that are set to sync with external servers will allow the phone to go to sleep and only wake it up to carry out the assigned task. After the task is executed the phone should go to sleep/deep sleep again without any external influence.
So, for what I originally thought is your requirement I believe I hinted at a practical solution, for what I suspect, but don't quite understand, you want you'd have to be more specific in order to get sensible answers.