I've been looking all over for a data sheet for these things but can't find them.
https://www.amazon.com/dp/B07Z1CSHDP?psc=1&ref=ppx_yo2_dt_b_product_details
Here's the amazon link. They're called 'XtremeAmazing 360 Degree 5 Pins Rotary Encoder Code Module Switch Digital Potentiometer Push Button with Knob Cap'
This is on me for buying such a cheap module. Documentation is a must.
I'd try and figure out the outputs but don't own an oscope