There is a solution to these problems. Define all those rules externally - outside PDI - and use the ruleengine step available in the marketplace to process the rules inside the transformations. The advantage? The rules are not anymore a part of the transformation and can be maintained by e.g. the business user, who knows the rules best. If changes have to be made, it's the users who will have to do it and you don't have to touch your code (transformation). It allows to centralize the rules and logic which is good for ETL processes, interfaces or other processing tasks.
Use the ruleengine to test/check your data, you can use it for filtering data that you want or not want to keep and you can modify the data based on the results of the rules. And keep in mind that all rules are outside PDI. Changes to the rules will not require you to change the transformation.
Apart from that, the ruleengine can be used also outside of PDI. It is a standard java library which can be embedded in websites, applications and can run as a server/client technology, also inside a docker container.