Using a .htaccess file for a 301 redirect is not considered cloaking by the search engines, since the content you will be displaying for them is the same as the content you will be displaying for your users.
You are telling Google and other SEs that the page they are requesting no longer exists, and the content is located at the new page.
From a ranking standpoint, you are likely to get some credit for any backlinks to the old domain, however I would see if you can get the old backlinks changed to your new page. The on-page factors will be taken from your new page, not the old one, so the ranking may change. In fact, unless there a ton of backlinks to the old page, it will probably disappear from the rankings.
The example htaccess you referenced only redirects the home page of the old domain to your domain's page. While it's probably not a good idea to redirect every page from the old domain to your new page, you might consider keeping your eye on the logs from the old domain to see if there are any other pages that have backlinks, or that people have bookmarked, that would be appropriate for some page in the new domain. Don't worry about redirecting pages that only bots request.