Yeah, scotch yoke seems to be easy one to animate/simulate properly, as the location of A (piston/conrod connection point in previous image), can be set to copy B's (yoke) location, by limiting its following behavior to consist only B's Z-axis movement.
To change gears - Although Blender's simulation/physics engine (Bullet) has some major issues with glitches, it can still be used for spotting/avoiding the same (tedious and probably takes too much effort to figure out what seemingly random errors are).
Nevertheless, there may be moments, when simulation runs as expected. An example, where vehicle drives around in circles, having its speed measured: