I’ve used the string method many a time and never had it fail yet! Another method is to insert a wooden wedge through the exhaust port on a 2-stroke to lock the piston. That way you aren’t putting undue pressure on the threads of the spark plug hole.
If you’re undoing flywheel nuts another tip is to look to see if it has a left hand thread- most are standard right hand, but every so often you come across a left-hooker and you only strip the thread once!