If you really want to see if your stroke is straight and you are hitting center of the cuball try the "whitey don't lie" drill, cueball on the foot spot, object ball on head spot, the goal is to shoot a stop shot, after hitting the rail have the object ball come back and hit the cueball and drive it back over the foot spot, you will be doing well to make contact at first, and then having the cueball return within the first diamond, out of the thousands of times I have done this drill I have only had the cueball come back directly over the spot twice, in order to complete this drill you must hit the cueball DEAD CENTER and your cue must travel perfectly straight, the slightest deviation will show where you are going wrong, if the object ball goes to the right you are hitting left of center and vice versa, if the object ball does not return directly over the foot spot your cue is not going through the cueball perfectly straight, this is a humbling drill, don't overdo this drill, spend 5 or 10 minutes and move on but do it every day, you will see the results.
What you recommend is an excellent drill to do
But
The problem with this drill and many others recommended in this thread,
Do not take into account a separate issue that is separate from having a straight stroke
And that is, can you actually align two balls perfectly straight?
Using the drill you recommended if for some reason, I see the center of the second ball a millimeter from the base and I deliver the Q ball with no side spin
To that spot a millimeter off
The object ball is not going to come back directly to my Cue ball
Even though my stroke was perfectly straight, I hit vertical axis. The cueball actually went exactly where I wanted it to, but I didn’t see my Target straight.
Being able to align, squarely or directly two balls in a straight line to aim at those targets is a separate skill from having a straight stroke
I’m on my phone and cannot provide a link but I believe it’s Chris Henry has a training set he calls “the balls”
Where first you work with one ball until you learn how to find vertical axis and deliver a straight stroke
Then you work with a second ball to see if you can line up two balls in a straight line because you have proven that you have a straight stroke
it’s just my opinion