1. How to hide/show related records list items conditionally.
2. How to access the controller of Related Record View, so I can apply the hide/show conditions on it.
You can study provided samples, JSDoc API documentation and community answers here of forums. This should be enough to get you started.
Retrieving data ...